summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2016-11-22 17:24:24 -0500
committerEli Collins <elic@assurancetechnologies.com>2016-11-22 17:24:24 -0500
commit0b4dd0be304bf2facd0f3c3f88b61353b8f0a473 (patch)
tree4711f3838f2c31395f15a613b5f37a3b4e7fcd92 /docs
parent4f03b94b1c26468400c4839c0932f411e6667fe7 (diff)
downloadpasslib-0b4dd0be304bf2facd0f3c3f88b61353b8f0a473.tar.gz
passlib.utils: relocated a bunch of binary encoding helpers to .utils.binary submodule
Diffstat (limited to 'docs')
-rw-r--r--docs/history/1.5.rst2
-rw-r--r--docs/history/1.6.rst2
-rw-r--r--docs/lib/passlib.hash.bigcrypt.rst8
-rw-r--r--docs/lib/passlib.hash.bsdi_crypt.rst8
-rw-r--r--docs/lib/passlib.hash.cisco_pix.rst4
-rw-r--r--docs/lib/passlib.hash.crypt16.rst8
-rw-r--r--docs/lib/passlib.hash.des_crypt.rst8
-rw-r--r--docs/lib/passlib.hash.dlitz_pbkdf2_sha1.rst4
-rw-r--r--docs/lib/passlib.hash.md5_crypt.rst4
-rw-r--r--docs/lib/passlib.hash.pbkdf2_digest.rst6
-rw-r--r--docs/lib/passlib.hash.scram.rst4
-rw-r--r--docs/lib/passlib.hash.sha1_crypt.rst2
-rw-r--r--docs/lib/passlib.hash.sha256_crypt.rst2
-rw-r--r--docs/lib/passlib.ifc.rst2
-rw-r--r--docs/lib/passlib.utils.binary.rst87
-rw-r--r--docs/lib/passlib.utils.rst71
16 files changed, 121 insertions, 101 deletions
diff --git a/docs/history/1.5.rst b/docs/history/1.5.rst
index 006bf99..575e81b 100644
--- a/docs/history/1.5.rst
+++ b/docs/history/1.5.rst
@@ -57,7 +57,7 @@
.. currentmodule:: passlib.hash
* *bugfix:* :class:`django_des_crypt` now accepts all
- :data:`hash64 <passlib.utils.h64>` characters in its salts;
+ :data:`hash64 <passlib.utils.binary.h64>` characters in its salts;
previously it accepted only lower-case hexadecimal characters (:issue:`22`).
* Additional unittests added for all
diff --git a/docs/history/1.6.rst b/docs/history/1.6.rst
index 6f3fac5..6b88c4b 100644
--- a/docs/history/1.6.rst
+++ b/docs/history/1.6.rst
@@ -392,7 +392,7 @@ Internal Changes
.. currentmodule:: passlib.utils
* :mod:`!passlib.utils.h64` has been replaced by an instance of the
- new :class:`~passlib.utils.Base64Engine` class. This instance is
+ new :class:`~passlib.utils.binary.Base64Engine` class. This instance is
imported under the same name, and has (mostly) the same interface;
but should be faster, more flexible, and better unit-tested.
diff --git a/docs/lib/passlib.hash.bigcrypt.rst b/docs/lib/passlib.hash.bigcrypt.rst
index fa9542b..cd603c7 100644
--- a/docs/lib/passlib.hash.bigcrypt.rst
+++ b/docs/lib/passlib.hash.bigcrypt.rst
@@ -25,11 +25,11 @@ Format
An example hash (of the string ``passphrase``) is ``S/8NbAAlzbYO66hAa9XZyWy2``.
A bigcrypt hash string has the format :samp:`{salt}{checksum_1}{checksum_2...}{checksum_n}` for some integer :samp:`{n}>0`, where:
-* :samp:`{salt}` is the salt, stored as a 2 character :data:`hash64 <passlib.utils.h64>`-encoded
+* :samp:`{salt}` is the salt, stored as a 2 character :data:`hash64 <passlib.utils.binary.h64>`-encoded
12-bit integer (``S/`` in the example).
* each :samp:`{checksum_i}` is a separate checksum, stored as an 11 character
- :data:`hash64-big <passlib.utils.h64big>`-encoded 64-bit integer (``8NbAAlzbYO6`` and ``6hAa9XZyWy2``
+ :data:`hash64-big <passlib.utils.binary.h64big>`-encoded 64-bit integer (``8NbAAlzbYO6`` and ``6hAa9XZyWy2``
in the example).
* the integer :samp:`n` (the number of checksums) is determined by the formula
@@ -65,7 +65,7 @@ The bigcrypt algorithm is designed to re-use the original des-crypt algorithm:
4. The 2 character salt string is decoded to a 12-bit integer salt value;
The salt string uses little-endian
- :data:`hash64 <passlib.utils.h64>` encoding.
+ :data:`hash64 <passlib.utils.binary.h64>` encoding.
5. 25 repeated rounds of modified DES encryption are performed;
starting with a null input block,
@@ -79,7 +79,7 @@ The bigcrypt algorithm is designed to re-use the original des-crypt algorithm:
lsb-padded with 2 zero bits.
7. The resulting 66-bit integer is encoded in big-endian order
- using the :data:`hash64-big <passlib.utils.h64big>` format.
+ using the :data:`hash64-big <passlib.utils.binary.h64big>` format.
This forms the first checksum segment.
8. For each additional block of 8 bytes in the padded password (from step 2),
diff --git a/docs/lib/passlib.hash.bsdi_crypt.rst b/docs/lib/passlib.hash.bsdi_crypt.rst
index 137a7c6..cb82797 100644
--- a/docs/lib/passlib.hash.bsdi_crypt.rst
+++ b/docs/lib/passlib.hash.bsdi_crypt.rst
@@ -52,7 +52,7 @@ A bsdi_crypt hash string consists of a 21 character string of the form :samp:`_{
All characters except the underscore prefix are drawn from ``[./0-9A-Za-z]``.
* ``_`` - the underscore is used to distinguish this scheme from others, such as des-crypt.
-* :samp:`{rounds}` is the number of rounds, stored as a 4 character :data:`hash64 <passlib.utils.h64>`-encoded 24-bit integer (``EQ0.`` in the example).
+* :samp:`{rounds}` is the number of rounds, stored as a 4 character :data:`hash64 <passlib.utils.binary.h64>`-encoded 24-bit integer (``EQ0.`` in the example).
* :samp:`{salt}` is the salt, stored as as a 4 character hash64-encoded 24-bit integer (``jzhS`` in the example).
* :samp:`{checksum}` is the checksum, stored as an 11 character hash64-encoded 64-bit integer (``VeUyoSqLupI`` in the example).
@@ -68,11 +68,11 @@ The checksum is formed by a modified version of the DES cipher in encrypt mode:
1. Given a password string, a salt string, and rounds string.
2. The 4 character rounds string is decoded to a 24-bit integer rounds value;
- The rounds string uses little-endian :data:`hash64 <passlib.utils.h64>`
+ The rounds string uses little-endian :data:`hash64 <passlib.utils.binary.h64>`
encoding.
3. The 4 character salt string is decoded to a 24-bit integer salt value;
- The salt string uses little-endian :data:`hash64 <passlib.utils.h64>`
+ The salt string uses little-endian :data:`hash64 <passlib.utils.binary.h64>`
encoding.
4. The password is NULL-padded on the end to the smallest non-zero multiple of 8 bytes.
@@ -103,7 +103,7 @@ The checksum is formed by a modified version of the DES cipher in encrypt mode:
lsb-padded with 2 zero bits.
9. The resulting 66-bit integer is encoded in big-endian order
- using the :data:`hash64-big <passlib.utils.h64big>` format.
+ using the :data:`hash64-big <passlib.utils.binary.h64big>` format.
.. _bsdi-crypt-security-issues:
diff --git a/docs/lib/passlib.hash.cisco_pix.rst b/docs/lib/passlib.hash.cisco_pix.rst
index 9ad9fdd..d879748 100644
--- a/docs/lib/passlib.hash.cisco_pix.rst
+++ b/docs/lib/passlib.hash.cisco_pix.rst
@@ -81,7 +81,7 @@ Interface
Format & Algorithm
==================
Cisco PIX / ASA hashes consist of a 12 byte digest, encoded as a 16 character
-:data:`HASH64 <passlib.utils.h64>`-encoded string. An example
+:data:`HASH64 <passlib.utils.binary.h64>`-encoded string. An example
hash (of ``"password"``) is ``"NuLKvvWGg.x9HEKO"``.
The PIX / ASA digests are calculated as follows:
@@ -110,7 +110,7 @@ The PIX / ASA digests are calculated as follows:
5. Discard every 4th byte of the 16-byte MD5 hash, starting
with the 4th byte.
-6. Encode the 12-byte result using :data:`HASH64 <passlib.utils.h64>`.
+6. Encode the 12-byte result using :data:`HASH64 <passlib.utils.binary.h64>`.
Security Issues
===============
diff --git a/docs/lib/passlib.hash.crypt16.rst b/docs/lib/passlib.hash.crypt16.rst
index 187c320..fc904d3 100644
--- a/docs/lib/passlib.hash.crypt16.rst
+++ b/docs/lib/passlib.hash.crypt16.rst
@@ -24,11 +24,11 @@ An example hash (of the string ``passphrase``) is ``aaX/UmCcBrceQ0kQGGWKTbuE``.
A crypt16 hash string has the format :samp:`{salt}{checksum_1}{checksum_2}`, where:
* :samp:`{salt}` is the salt, stored as a 2 character
- :data:`hash64 <passlib.utils.h64>`-encoded 12-bit integer (``aa`` in the
+ :data:`hash64 <passlib.utils.binary.h64>`-encoded 12-bit integer (``aa`` in the
example).
* each :samp:`{checksum_i}` is a separate checksum, stored as an 11 character
- :data:`hash64-big <passlib.utils.h64big>`-encoded 64-bit integer
+ :data:`hash64-big <passlib.utils.binary.h64big>`-encoded 64-bit integer
(``X/UmCcBrceQ`` and ``0kQGGWKTbuE`` in the example).
.. note::
@@ -47,7 +47,7 @@ The crypt16 algorithm uses a weakened version of the des-crypt algorithm:
1. Given a password string and a salt string.
2. The 2 character salt string is decoded to a 12-bit integer salt value;
- The salt string uses little-endian :data:`hash64 <passlib.utils.h64>`
+ The salt string uses little-endian :data:`hash64 <passlib.utils.binary.h64>`
encoding.
3. If the password is larger than 16 bytes, the end is truncated to 16 bytes.
@@ -71,7 +71,7 @@ The crypt16 algorithm uses a weakened version of the des-crypt algorithm:
lsb-padded with 2 zero bits.
7. The resulting 66-bit integer is encoded in big-endian order
- using the :data:`hash64-big <passlib.utils.h64big>` format.
+ using the :data:`hash64-big <passlib.utils.binary.h64big>` format.
This is the first checksum segment.
8. The second checksum segment is created by repeating
diff --git a/docs/lib/passlib.hash.des_crypt.rst b/docs/lib/passlib.hash.des_crypt.rst
index dfd61f5..7aa6528 100644
--- a/docs/lib/passlib.hash.des_crypt.rst
+++ b/docs/lib/passlib.hash.des_crypt.rst
@@ -41,7 +41,7 @@ Interface
Format
======
A des-crypt hash string consists of 13 characters, drawn from ``[./0-9A-Za-z]``.
-The first 2 characters form a :data:`hash64 <passlib.utils.h64>`-encoded
+The first 2 characters form a :data:`hash64 <passlib.utils.binary.h64>`-encoded
12 bit integer used as the salt, with the remaining characters
forming a hash64-encoded 64-bit integer checksum.
@@ -59,7 +59,7 @@ The checksum is formed by a modified version of the DES cipher in encrypt mode:
1. Given a password string and a salt string.
2. The 2 character salt string is decoded to a 12-bit integer salt value;
- The salt string uses little-endian :data:`hash64 <passlib.utils.h64>`
+ The salt string uses little-endian :data:`hash64 <passlib.utils.binary.h64>`
encoding.
3. If the password is less than 8 bytes, it's NULL padded at the end to 8 bytes.
@@ -86,7 +86,7 @@ The checksum is formed by a modified version of the DES cipher in encrypt mode:
lsb-padded with 2 zero bits.
7. The resulting 66-bit integer is encoded in big-endian order using the
- :data:`hash64-big <passlib.utils.h64big>` format.
+ :data:`hash64-big <passlib.utils.binary.h64big>` format.
Security Issues
===============
@@ -117,7 +117,7 @@ This implementation of des-crypt differs from others in a few ways:
* Restricted salt string character set:
The underlying algorithm expects salt strings to use the
- :data:`hash64 <passlib.utils.HASH64_CHARS>` character set to encode
+ :data:`hash64 <passlib.utils.binary.HASH64_CHARS>` character set to encode
a 12-bit integer. Many implementations of des-crypt will
accept a salt containing other characters, but
vary wildly in how they are handled, including errors and implementation-specific value mappings.
diff --git a/docs/lib/passlib.hash.dlitz_pbkdf2_sha1.rst b/docs/lib/passlib.hash.dlitz_pbkdf2_sha1.rst
index 270cd75..e32b525 100644
--- a/docs/lib/passlib.hash.dlitz_pbkdf2_sha1.rst
+++ b/docs/lib/passlib.hash.dlitz_pbkdf2_sha1.rst
@@ -44,11 +44,11 @@ where:
stored as lowercase hexadecimal number with no zero-padding (in the example: ``2710`` or 10000 iterations).
* :samp:`{salt}` is the salt string, which can be any number of characters,
- drawn from the :data:`hash64 charset <passlib.utils.HASH64_CHARS>`
+ drawn from the :data:`hash64 charset <passlib.utils.binary.HASH64_CHARS>`
(``.pPqsEwHD7MiECU0`` in the example).
* :samp:`{checksum}` is 32 characters, which encode
- the resulting 24-byte PBKDF2 derived key using :func:`~passlib.utils.ab64_encode`
+ the resulting 24-byte PBKDF2 derived key using :func:`~passlib.utils.binary.ab64_encode`
(``b8TQ5AMQemtlaSgegw5Je.JBE3QQhLbO`` in the example).
In order to generate the checksum, the password is first encoded into UTF-8 if it's unicode.
diff --git a/docs/lib/passlib.hash.md5_crypt.rst b/docs/lib/passlib.hash.md5_crypt.rst
index 3251f12..844b6b6 100644
--- a/docs/lib/passlib.hash.md5_crypt.rst
+++ b/docs/lib/passlib.hash.md5_crypt.rst
@@ -146,7 +146,7 @@ The MD5-Crypt algorithm [#f1]_ calculates a checksum as follows:
following order: ``12,6,0,13,7,1,14,8,2,15,9,3,5,10,4,11``.
18. Encode the resulting 16 byte string into a 22 character
- :data:`hash64 <passlib.utils.h64>`-encoded string
+ :data:`hash64 <passlib.utils.binary.h64>`-encoded string
(the 2 msb bits encoded by the last hash64 character are used as 0 padding).
This results in the portion of the md5 crypt hash string referred to as :samp:`{checksum}` in the format section.
@@ -172,7 +172,7 @@ Passlib's implementation of md5-crypt differs from the reference implementation
The underlying algorithm can unambiguously handle salt strings
which contain any possible byte value besides ``\x00`` and ``$``.
However, Passlib strictly limits salts to the
- :data:`hash64 <passlib.utils.HASH64_CHARS>` character set,
+ :data:`hash64 <passlib.utils.binary.HASH64_CHARS>` character set,
as nearly all implementations of md5-crypt generate
and expect salts containing those characters,
but may have unexpected behaviors for other character values.
diff --git a/docs/lib/passlib.hash.pbkdf2_digest.rst b/docs/lib/passlib.hash.pbkdf2_digest.rst
index ff82c4f..10e68ba 100644
--- a/docs/lib/passlib.hash.pbkdf2_digest.rst
+++ b/docs/lib/passlib.hash.pbkdf2_digest.rst
@@ -84,10 +84,10 @@ follow the same format, :samp:`$pbkdf2-{digest}${rounds}${salt}${checksum}`.
this is encoded as a positive decimal number with no zero-padding
(``6400`` in the example).
-* :samp:`{salt}` - this is the :func:`adapted base64 encoding <passlib.utils.ab64_encode>`
+* :samp:`{salt}` - this is the :func:`adapted base64 encoding <passlib.utils.binary.ab64_encode>`
of the raw salt bytes passed into the PBKDF2 function.
-* :samp:`{checksum}` - this is the :func:`adapted base64 encoding <passlib.utils.ab64_encode>`
+* :samp:`{checksum}` - this is the :func:`adapted base64 encoding <passlib.utils.binary.ab64_encode>`
of the raw derived key bytes returned from the PBKDF2 function.
Each scheme uses the digest size of its specific hash algorithm (:samp:`{digest}`)
as the size of the raw derived key. This is enlarged
@@ -99,7 +99,7 @@ The password is encoded into UTF-8 if not already encoded,
and run through :func:`~passlib.crypto.digest.pbkdf2_hmac`
along with the decoded salt, the number of rounds,
and a prf built from HMAC + the respective message digest.
-The result is then encoded using :func:`~passlib.utils.ab64_encode`.
+The result is then encoded using :func:`~passlib.utils.binary.ab64_encode`.
.. rubric:: Footnotes
diff --git a/docs/lib/passlib.hash.scram.rst b/docs/lib/passlib.hash.scram.rst
index 9a6a70e..a1f63b6 100644
--- a/docs/lib/passlib.hash.scram.rst
+++ b/docs/lib/passlib.hash.scram.rst
@@ -119,13 +119,13 @@ An scram hash string has the format :samp:`$scram${rounds}${salt}${alg1}={digest
zero-padding not allowed. this value must be in ``range(1, 2**32)``.
* :samp:`{salt}` is a base64 salt string (``.Z/znnNOKWUsBaCU`` in the example),
- encoded using :func:`~passlib.utils.ab64_encode`.
+ encoded using :func:`~passlib.utils.binary.ab64_encode`.
* :samp:`{alg}` is a lowercase IANA hash function name [#hnames]_, which should
match the digest in the SCRAM mechanism name.
* :samp:`{digest}` is a base64 digest for the specific algorithm,
- encoded using :func:`~passlib.utils.ab64_encode`.
+ encoded using :func:`~passlib.utils.binary.ab64_encode`.
Digests for ``sha-1``, ``sha-256``, and ``sha-512`` are present in the example.
* There will always be one or more :samp:`{alg}={digest}` pairs, separated by a
diff --git a/docs/lib/passlib.hash.sha1_crypt.rst b/docs/lib/passlib.hash.sha1_crypt.rst
index 88c205e..f8be4d8 100644
--- a/docs/lib/passlib.hash.sha1_crypt.rst
+++ b/docs/lib/passlib.hash.sha1_crypt.rst
@@ -88,7 +88,7 @@ in a few ways:
The underlying algorithm can unambiguously handle salt strings
which contain any possible byte value besides ``\x00`` and ``$``.
However, Passlib strictly limits salts to the
- :data:`hash64 <passlib.utils.HASH64_CHARS>` character set,
+ :data:`hash64 <passlib.utils.binary.HASH64_CHARS>` character set,
as nearly all implementations of sha1-crypt generate
and expect salts containing those characters.
diff --git a/docs/lib/passlib.hash.sha256_crypt.rst b/docs/lib/passlib.hash.sha256_crypt.rst
index 4c098ba..b1e23e8 100644
--- a/docs/lib/passlib.hash.sha256_crypt.rst
+++ b/docs/lib/passlib.hash.sha256_crypt.rst
@@ -115,7 +115,7 @@ and other implementations, in a few ways:
The underlying algorithm can unambiguously handle salt strings
which contain any possible byte value besides ``\x00`` and ``$``.
However, Passlib strictly limits salts to the
- :data:`hash64 <passlib.utils.HASH64_CHARS>` character set,
+ :data:`hash64 <passlib.utils.binary.HASH64_CHARS>` character set,
as nearly all implementations of sha256-crypt generate
and expect salts containing those characters,
but may have unexpected behaviors for other character values.
diff --git a/docs/lib/passlib.ifc.rst b/docs/lib/passlib.ifc.rst
index 7612a95..8118a4c 100644
--- a/docs/lib/passlib.ifc.rst
+++ b/docs/lib/passlib.ifc.rst
@@ -604,7 +604,7 @@ and the following attributes should be defined:
in a salt string.
For most :ref:`modular-crypt-format` hashes,
- this is equal to :data:`passlib.utils.HASH64_CHARS`.
+ this is equal to :data:`passlib.utils.binary.HASH64_CHARS`.
For the rare hashes where the ``salt`` parameter must be specified
in bytes, this will be a placeholder :class:`!bytes` object containing
all 256 possible byte values.
diff --git a/docs/lib/passlib.utils.binary.rst b/docs/lib/passlib.utils.binary.rst
new file mode 100644
index 0000000..0c5847d
--- /dev/null
+++ b/docs/lib/passlib.utils.binary.rst
@@ -0,0 +1,87 @@
+=====================================================
+:mod:`passlib.utils.binary` - Binary Helper Functions
+=====================================================
+
+.. module:: passlib.utils.binary
+ :synopsis: internal helpers for binary data
+
+.. warning::
+
+ This module is primarily used as an internal support module.
+ Its interface has not been finalized yet, and may be changed somewhat
+ between major releases of Passlib, as the internal code is cleaned up
+ and simplified.
+
+Constants
+=========
+
+Base64 Encoding
+===============
+
+Base64Engine Class
+------------------
+Passlib has to deal with a number of different Base64 encodings,
+with varying endianness, as well as wildly different character <-> value
+mappings. This is all encapsulated in the :class:`Base64Engine` class,
+which provides common encoding actions for an arbitrary base64-style encoding
+scheme. There are also a couple of predefined instances which are commonly
+used by the hashes in Passlib.
+
+.. autoclass:: Base64Engine
+
+Common Character Maps
+---------------------
+.. data:: BASE64_CHARS
+
+ Character map used by standard MIME-compatible Base64 encoding scheme.
+
+.. data:: HASH64_CHARS
+
+ Base64 character map used by a number of hash formats;
+ the ordering is wildly different from the standard base64 character map.
+
+ This encoding system appears to have originated with
+ :class:`~passlib.hash.des_crypt`, but is used by
+ :class:`~passlib.hash.md5_crypt`, :class:`~passlib.hash.sha256_crypt`,
+ and others. Within Passlib, this encoding is referred as the "hash64" encoding,
+ to distinguish it from normal base64 and others.
+
+.. data:: BCRYPT_CHARS
+
+ Base64 character map used by :class:`~passlib.hash.bcrypt`.
+ The ordering is wildly different from both the standard base64 character map,
+ and the common hash64 character map.
+
+Predefined Instances
+--------------------
+.. data:: h64
+
+ Predefined instance of :class:`Base64Engine` which uses
+ the :data:`!HASH64_CHARS` character map and little-endian encoding.
+ (see :data:`HASH64_CHARS` for more details).
+
+.. data:: h64big
+
+ Predefined variant of :data:`h64` which uses big-endian encoding.
+ This is mainly used by :class:`~passlib.hash.des_crypt`.
+
+.. versionchanged:: 1.6
+ Previous versions of Passlib contained
+ a module named :mod:`!passlib.utils.h64`; As of Passlib 1.6 this
+ was replaced by the the ``h64`` and ``h64big`` instances of
+ the :class:`Base64Engine` class;
+ the interface remains mostly unchanged.
+
+
+Other
+-----
+.. autofunction:: ab64_encode
+.. autofunction:: ab64_decode
+.. autofunction:: b32_encode
+.. autofunction:: b32_decode
+
+..
+ .. data:: AB64_CHARS
+
+ Variant of standard Base64 character map used by some
+ custom Passlib hashes (see :func:`ab64_encode`).
diff --git a/docs/lib/passlib.utils.rst b/docs/lib/passlib.utils.rst
index fc08f13..6f05703 100644
--- a/docs/lib/passlib.utils.rst
+++ b/docs/lib/passlib.utils.rst
@@ -108,75 +108,6 @@ Encoding Helpers
.. autofunction:: to_unicode
.. autofunction:: to_native_str
-Base64 Encoding
-===============
-
-Base64Engine Class
-------------------
-Passlib has to deal with a number of different Base64 encodings,
-with varying endianness, as well as wildly different character <-> value
-mappings. This is all encapsulated in the :class:`Base64Engine` class,
-which provides common encoding actions for an arbitrary base64-style encoding
-scheme. There are also a couple of predefined instances which are commonly
-used by the hashes in Passlib.
-
-.. autoclass:: Base64Engine
-
-Common Character Maps
----------------------
-.. data:: BASE64_CHARS
-
- Character map used by standard MIME-compatible Base64 encoding scheme.
-
-.. data:: HASH64_CHARS
-
- Base64 character map used by a number of hash formats;
- the ordering is wildly different from the standard base64 character map.
-
- This encoding system appears to have originated with
- :class:`~passlib.hash.des_crypt`, but is used by
- :class:`~passlib.hash.md5_crypt`, :class:`~passlib.hash.sha256_crypt`,
- and others. Within Passlib, this encoding is referred as the "hash64" encoding,
- to distinguish it from normal base64 and others.
-
-.. data:: BCRYPT_CHARS
-
- Base64 character map used by :class:`~passlib.hash.bcrypt`.
- The ordering is wildly different from both the standard base64 character map,
- and the common hash64 character map.
-
-Predefined Instances
---------------------
-.. data:: h64
-
- Predefined instance of :class:`Base64Engine` which uses
- the :data:`!HASH64_CHARS` character map and little-endian encoding.
- (see :data:`HASH64_CHARS` for more details).
-
-.. data:: h64big
-
- Predefined variant of :data:`h64` which uses big-endian encoding.
- This is mainly used by :class:`~passlib.hash.des_crypt`.
-
-.. versionchanged:: 1.6
- Previous versions of Passlib contained
- a module named :mod:`!passlib.utils.h64`; As of Passlib 1.6 this
- was replaced by the the ``h64`` and ``h64big`` instances of
- the :class:`Base64Engine` class;
- the interface remains mostly unchanged.
-
-
-Other
------
-.. autofunction:: ab64_encode
-.. autofunction:: ab64_decode
-
-..
- .. data:: AB64_CHARS
-
- Variant of standard Base64 character map used by some
- custom Passlib hashes (see :func:`ab64_encode`).
-
..
Host OS
=======
@@ -215,8 +146,10 @@ There are also a few sub modules which provide additional utility functions:
:maxdepth: 1
passlib.utils.handlers
+ passlib.utils.binary
passlib.utils.des
passlib.utils.pbkdf2
..
+ passlib.utils.decor
passlib.utils.compat