summaryrefslogtreecommitdiff
path: root/docs/lib
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2016-11-10 12:54:08 -0500
committerEli Collins <elic@assurancetechnologies.com>2016-11-10 12:54:08 -0500
commitf19061e03d659db143d8dffc17278c5b817b0610 (patch)
treecf00cce5054e00e43b3718a6e7040e379ec8a6a1 /docs/lib
parent10a394a2be2f08a662994c044423db58778c762a (diff)
downloadpasslib-f19061e03d659db143d8dffc17278c5b817b0610.tar.gz
pwd: updated docs, made default word/charsets public, minor optimizations
* updated doc strings, documented ZXCBN project urls * wordsets now use lazy-loading dictionary, so dict can be accessed normally, yet still preserve lazy loading behavior behind the scenes. * unique char/word check now caches results, to speed up subsequent calls. *
Diffstat (limited to 'docs/lib')
-rw-r--r--docs/lib/passlib.pwd.rst55
1 files changed, 43 insertions, 12 deletions
diff --git a/docs/lib/passlib.pwd.rst b/docs/lib/passlib.pwd.rst
index 7a89414..de4ee50 100644
--- a/docs/lib/passlib.pwd.rst
+++ b/docs/lib/passlib.pwd.rst
@@ -7,25 +7,56 @@
.. versionadded:: 1.7
-.. todo::
- This module is still a work in progress, it's API may change
- before release. See module source for detailed todo list.
-
Password Generation
===================
+
+.. rst-class:: float-center
+
.. warning::
- Before using these routines, be sure your system's RNG state is safe,
- and that you use a sufficiently high ``entropy`` value for
- the intended purpose.
+ Before using these routines, make sure your system's RNG entropy pool is
+ secure and full. Also make sure that :func:`!genword` or :func:`!genphrase`
+ is called with a sufficiently high ``entropy`` parameter
+ the intended purpose of the password.
+
+.. autofunction:: genword(entropy=None, length=None, charset="ascii_62", chars=None, returns=None)
+
+.. autofunction:: genphrase(entropy=None, length=None, wordset="eff_long", words=None, sep=" ", returns=None)
+
+Predefined Symbol Sets
+======================
+The following predefined sets are used by the generation functions above,
+but are exported by this module for general use:
+
+.. object:: default_charsets
-.. autofunction:: genword(entropy=None, length=None, charset="ascii62", chars=None, returns=None)
+ Dictionary mapping charset name -> string of characters, used by :func:`genword`.
+ See that function for a list of predefined charsets present in this dict.
-.. autofunction:: genphrase(entropy=None, length=None, wordset="beale", words=None, sep=" ", returns=None)
+.. object:: default_wordsets
+
+ Dictionary mapping wordset name -> tuple of words, used by :func:`genphrase`.
+ See that function for a list of predefined wordsets present in this dict.
+
+ (Note that this is actually a special object which will lazy-load
+ wordsets from disk on-demand)
Password Strength Estimation
============================
Passlib does not current offer any password strength estimation routines.
-However, the (javascript-based) `ZXCVBN <https://github.com/dropbox/zxcvbn>`_
-project is a very good choice for this purpose. There are a few python
-ports of this library, though as of 2016-11, none of them seem active and up to date.
+However, the (javascript-based) `zxcvbn <https://github.com/dropbox/zxcvbn>`_
+project is a very good choice. There are a few python ports of ZCVBN library, though as of 2016-11,
+none of them seem active and up to date.
+
+The following is a list of known ZCVBN python ports, though it's not clear which of these
+is active and/or official:
+
+* https://github.com/dropbox/python-zxcvbn -- seemingly official python version,
+ but not updated since 2013, and not published on pypi.
+
+* https://github.com/rpearl/python-zxcvbn -- fork of official version,
+ also not updated since 2013, but released to pypi as `"zxcvbn" <https://pypi.python.org/pypi/zxcvbn>`_.
+
+* https://github.com/gordon86/python-zxcvbn -- fork that has some updates as of july 2015,
+ released to pypi as `"zxcvbn-py3" <https://pypi.python.org/pypi/zxcvbn-py3>`_ (and compatible
+ with 2 & 3, despite the name).