summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2011-02-11 15:12:39 -0500
committerEli Collins <elic@assurancetechnologies.com>2011-02-11 15:12:39 -0500
commit5583fd6d15cc26ab4feb310e43107c252d1d32d5 (patch)
tree28e5940116e162bbe433a0c00d69090499dc9fe6
parent8afdc50407972f771127545a6ca50069449282bd (diff)
downloadpasslib-5583fd6d15cc26ab4feb310e43107c252d1d32d5.tar.gz
tweaks to docs
-rw-r--r--docs/lib/passlib.hash.des_crypt.rst2
-rw-r--r--docs/lib/passlib.hash.ext_des_crypt.rst4
-rw-r--r--docs/lib/passlib.hash.sha1_crypt.rst10
-rw-r--r--docs/lib/passlib.hash.sha256_crypt.rst2
-rw-r--r--docs/lib/passlib.hash.sha512_crypt.rst2
-rw-r--r--docs/lib/passlib.unix.rst18
-rw-r--r--passlib/hash/sha1_crypt.py2
7 files changed, 29 insertions, 11 deletions
diff --git a/docs/lib/passlib.hash.des_crypt.rst b/docs/lib/passlib.hash.des_crypt.rst
index 7aa3041..c5e0eb3 100644
--- a/docs/lib/passlib.hash.des_crypt.rst
+++ b/docs/lib/passlib.hash.des_crypt.rst
@@ -1,5 +1,5 @@
=======================================================================
-:mod:`passlib.hash.des_crypt` - Tradtional Unix DES Crypt
+:mod:`passlib.hash.des_crypt` - Tradtional Unix (DES) Crypt
=======================================================================
.. module:: passlib.hash.des_crypt
diff --git a/docs/lib/passlib.hash.ext_des_crypt.rst b/docs/lib/passlib.hash.ext_des_crypt.rst
index 8c611a6..7bc676d 100644
--- a/docs/lib/passlib.hash.ext_des_crypt.rst
+++ b/docs/lib/passlib.hash.ext_des_crypt.rst
@@ -1,9 +1,9 @@
=================================================================================
-:mod:`passlib.hash.ext_des_crypt` - Extended DES Crypt
+:mod:`passlib.hash.ext_des_crypt` - BSDi (Extended DES) Crypt
=================================================================================
.. module:: passlib.hash.ext_des_crypt
- :synopsis: Extended Unix (DES) Crypt
+ :synopsis: BSDi (Extended DES) Crypt
This algorithm was developed by BSDi for their BSD/OS distribution.
It's based on :mod:`~passlib.hash.des_crypt`, and contains a larger
diff --git a/docs/lib/passlib.hash.sha1_crypt.rst b/docs/lib/passlib.hash.sha1_crypt.rst
index 230ca9a..e9b01b5 100644
--- a/docs/lib/passlib.hash.sha1_crypt.rst
+++ b/docs/lib/passlib.hash.sha1_crypt.rst
@@ -1,9 +1,9 @@
===================================================================
-:mod:`passlib.hash.sha1_crypt` - SHA1 Crypt password hash
+:mod:`passlib.hash.sha1_crypt` - SHA-1 Crypt
===================================================================
.. module:: passlib.hash.sha1_crypt
- :synopsis: SHA1 Crypt
+ :synopsis: SHA-1 Crypt
SHA1-Crypt is a hash algorithm introduced by NetBSD in 2004.
It's based on a variation of the PBKDF1 algorithm,
@@ -54,12 +54,12 @@ as well as providing some of the advancements made in PDKDF2).
* the checksum is then rendered into hash-64 format
using an ordering that roughly corresponds to big-endian
- encoding of 24-bit chunks (see :object:`passlib.hash.sha1_crypt._chk_offsets` for exact byte order).
+ encoding of 24-bit chunks (see :data:`passlib.hash.sha1_crypt._chk_offsets` for exact byte order).
Deviations
==========
This implementation of sha1-crypt differs from the NetBSD implementation
-in two ways:
+in a few ways:
* The NetBSD implementation randomly varies the actual number of rounds
when generating a new configuration string, in order to decrease
@@ -76,7 +76,7 @@ in two ways:
* While the underlying algorithm technically allows salt strings
to contain any possible byte value besides ``\x00`` and ``$``,
- this would conflict with many uses of sha512-crypt, such as within
+ this would conflict with many uses of sha1-crypt, such as within
unix ``/etc/shadow`` files. Futhermore, most unix systems
will only generate salts using the standard 64 characters listed above.
This implementation follows along with that, by strictly limiting
diff --git a/docs/lib/passlib.hash.sha256_crypt.rst b/docs/lib/passlib.hash.sha256_crypt.rst
index 73ae43f..d709c84 100644
--- a/docs/lib/passlib.hash.sha256_crypt.rst
+++ b/docs/lib/passlib.hash.sha256_crypt.rst
@@ -1,5 +1,5 @@
==================================================================
-:mod:`passlib.hash.sha256_crypt` - SHA-256 Crypt password hash
+:mod:`passlib.hash.sha256_crypt` - SHA-256 Crypt
==================================================================
.. module:: passlib.hash.sha526_crypt
diff --git a/docs/lib/passlib.hash.sha512_crypt.rst b/docs/lib/passlib.hash.sha512_crypt.rst
index 3e115eb..cdf4e23 100644
--- a/docs/lib/passlib.hash.sha512_crypt.rst
+++ b/docs/lib/passlib.hash.sha512_crypt.rst
@@ -1,5 +1,5 @@
===================================================================
-:mod:`passlib.hash.sha512_crypt` - SHA-512 Crypt password hash
+:mod:`passlib.hash.sha512_crypt` - SHA-512 Crypt
===================================================================
.. module:: passlib.hash.sha512_crypt
diff --git a/docs/lib/passlib.unix.rst b/docs/lib/passlib.unix.rst
index 6d290ad..4e59714 100644
--- a/docs/lib/passlib.unix.rst
+++ b/docs/lib/passlib.unix.rst
@@ -65,3 +65,21 @@ this can be violated on some systems if the user intervenes.
.. note::
:mod:`passlib.hash.des_crypt` and :mod:`passlib.hash.ext_des_crypt`
do not follow this protocol, since they predate it by many years.
+
+OS Format Support
+=================
+The following table details which operating systems
+are known to support which schemes:
+
+=================================== =========== =========== =========== ===========
+Scheme Linux FreeBSD NetBSD OpenBSD
+=================================== =========== =========== =========== ===========
+:mod:`~passlib.hash.nthash` y
+:mod:`~passlib.hash.des_crypt` y y y y
+:mod:`~passlib.hash.ext_des_crypt` y y
+:mod:`~passlib.hash.md5_crypt` y y y y
+:mod:`~passlib.hash.bcrypt` y y y
+:mod:`~passlib.hash.sha1_crypt` y
+:mod:`~passlib.hash.sha256_crypt` y
+:mod:`~passlib.hash.sha512_crypt` y
+=================================== =========== =========== =========== ===========
diff --git a/passlib/hash/sha1_crypt.py b/passlib/hash/sha1_crypt.py
index 57f0306..062ed55 100644
--- a/passlib/hash/sha1_crypt.py
+++ b/passlib/hash/sha1_crypt.py
@@ -31,7 +31,7 @@ def hmac_sha1(key, msg):
if _EVP:
try:
- result = _EVP.hmac('x','y') #default *should* be sha1, which saves us a wrapper
+ result = _EVP.hmac('x','y') #default *should* be sha1, which saves us a wrapper, but might as well check.
except ValueError:
pass
else: