diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2016-02-10 14:27:53 -0500 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2016-02-10 14:27:53 -0500 |
| commit | 7b598fe89d604ef91efd4f71253ffb9ab0aae7c5 (patch) | |
| tree | 1f732aa6364a37e3e18e5d0788eda208f95219d1 /docs/lib/passlib.crypto.digest.rst | |
| parent | 590aef9ab3d872830ca27d95833e78c737fccd2d (diff) | |
| download | passlib-7b598fe89d604ef91efd4f71253ffb9ab0aae7c5.tar.gz | |
relocated many of the crypto routes inside passlib.utils,
and moved them to a separate passlib.crypto subpackage.
along with this move, made a few api cleanups:
* unified all code that's looking up hashes
to use new passlib.crypto.lookup_hash() wrapper, which takes
care of hash name normalization, loading fallback implementations,
and alg metadata inspection, all hidden behind a memoized function.
* deprecated pbkdf2() in favor of pbkdf2_hmac() -- only real use,
and new signature matches stdlib function. additionally,
this version is a bit faster, due to some assumptions that
can be made due to the PRF always being HMAC based.
* added compile_hmac() helper which does an even more efficient
job of pre-compiling a keyed HMAC function; this helped speed up pbkdf2 a bit more.
Diffstat (limited to 'docs/lib/passlib.crypto.digest.rst')
| -rw-r--r-- | docs/lib/passlib.crypto.digest.rst | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/lib/passlib.crypto.digest.rst b/docs/lib/passlib.crypto.digest.rst new file mode 100644 index 0000000..fda5e80 --- /dev/null +++ b/docs/lib/passlib.crypto.digest.rst @@ -0,0 +1,39 @@ +============================================================= +:mod:`passlib.crypto.digest` - Hash & Related Helpers +============================================================= + +.. module:: passlib.crypto.digest + :synopsis: Internal cryptographic helpers + +.. versionadded:: 1.7 + +This module provides various cryptographic support functions used by Passlib +to implement the various password hashes it provides, as well as paper over +some VM & version incompatibilities. + +Hash Functions +============== +.. autofunction:: norm_hash_name +.. autofunction:: lookup_hash + +.. autoclass:: HashInfo() + +.. note:: + + :func:`!lookup_hash` supports all hashes available directly in :mod:`hashlib`, + as well as offered through :func:`hashlib.new`. + It will also fallback to passlib's builtin MD4 implementation if one is not natively available. + +HMAC Functions +============== + +.. autofunction:: compile_hmac + +PKCS#5 Key Derivation Functions +=============================== +.. autofunction:: pbkdf1 +.. autofunction:: pbkdf2_hmac + +.. note:: + + The details of PBKDF1 and PBKDF2 are specified in :rfc:`2898`. |
