summaryrefslogtreecommitdiff
path: root/docs/lib/passlib.utils.h64.rst
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2011-01-31 23:34:37 +0000
committerEli Collins <elic@assurancetechnologies.com>2011-01-31 23:34:37 +0000
commit0eafd59fcee89cf4769add43c057a11e62c49a3a (patch)
tree19b476c6317f76ce39140900d1d671440aef34ae /docs/lib/passlib.utils.h64.rst
parent8903ccd8ecf8b26cd5e80466eecfdd8df140482b (diff)
downloadpasslib-0eafd59fcee89cf4769add43c057a11e62c49a3a.tar.gz
updated docs
Diffstat (limited to 'docs/lib/passlib.utils.h64.rst')
-rw-r--r--docs/lib/passlib.utils.h64.rst42
1 files changed, 42 insertions, 0 deletions
diff --git a/docs/lib/passlib.utils.h64.rst b/docs/lib/passlib.utils.h64.rst
new file mode 100644
index 0000000..b5f249b
--- /dev/null
+++ b/docs/lib/passlib.utils.h64.rst
@@ -0,0 +1,42 @@
+================================================
+:mod:`passlib.utils.h64` - Hash-64 Codec helpers
+================================================
+
+
+.. module:: passlib.utils.h64
+ :synopsis: Hash-64 Codec helpers
+
+Many of the password hash algorithms in passlib
+use a encoding scheme very similar to (but not compatible with)
+the standard base64 encoding scheme. the main differences are that
+it assigns the characters *completely* different numeric values compared
+to base64, as well as using ``.`` instead of ``+`` in it's character set.
+
+This encoding system appears to have originated with des-crypt hash,
+but is used by md5-crypt, sha-256-crypt, and others.
+within passlib, this encoding is referred as ``hash64`` encoding,
+and this module contains various utilities functions for encoding
+and decoding strings in that format.
+
+.. note::
+ It may *look* like bcrypt uses this scheme,
+ when in fact bcrypt uses the standard base64 encoding scheme,
+ but with ``+`` replaced with ``.``.
+
+.. data:: CHARS
+
+ The character set used by the Hash-64 format.
+ Index in character set denotes 6-bit integer value.
+
+.. autofunction:: encode_3_offsets
+.. autofunction:: encode_2_offsets
+.. autofunction:: encode_1_offset
+
+.. autofunction:: decode_int12
+.. autofunction:: encode_int12
+
+.. autofunction:: decode_int24
+.. autofunction:: encode_int24
+
+.. autofunction:: decode_int64
+.. autofunction:: encode_int64