summaryrefslogtreecommitdiff
path: root/passlib/handlers/ldap_digests.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2012-06-27 16:55:49 -0400
committerEli Collins <elic@assurancetechnologies.com>2012-06-27 16:55:49 -0400
commite6bdbce71624c38417c6ffb2993ac4eae7a42c2c (patch)
tree3f2bf111f055d12e598784f308f21ec4424b00a2 /passlib/handlers/ldap_digests.py
parentaf2c8c5f4ab5e5ce9c117dedb9f137fc632a0206 (diff)
downloadpasslib-e6bdbce71624c38417c6ffb2993ac4eae7a42c2c.tar.gz
removed some unused files, tweaked some internal comments
Diffstat (limited to 'passlib/handlers/ldap_digests.py')
-rw-r--r--passlib/handlers/ldap_digests.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/passlib/handlers/ldap_digests.py b/passlib/handlers/ldap_digests.py
index 17c9686..ed12e86 100644
--- a/passlib/handlers/ldap_digests.py
+++ b/passlib/handlers/ldap_digests.py
@@ -110,8 +110,6 @@ class ldap_md5(_Base64DigestHelper):
The :meth:`~passlib.ifc.PasswordHash.encrypt` and :meth:`~passlib.ifc.PasswordHash.genconfig` methods have no optional keywords.
"""
name = "ldap_md5"
- setting_kwds = ()
-
ident = u("{MD5}")
_hash_func = md5
_hash_regex = re.compile(u(r"^\{MD5\}(?P<chk>[+/a-zA-Z0-9]{22}==)$"))
@@ -122,8 +120,6 @@ class ldap_sha1(_Base64DigestHelper):
The :meth:`~passlib.ifc.PasswordHash.encrypt` and :meth:`~passlib.ifc.PasswordHash.genconfig` methods have no optional keywords.
"""
name = "ldap_sha1"
- setting_kwds = ()
-
ident = u("{SHA}")
_hash_func = sha1
_hash_regex = re.compile(u(r"^\{SHA\}(?P<chk>[+/a-zA-Z0-9]{27}=)$"))
@@ -241,17 +237,15 @@ class ldap_plaintext(plaintext):
return bool(hash) and cls._2307_pat.match(hash) is None
#=========================================================
-#{CRYPT} wrappers
-#=========================================================
-
+# {CRYPT} wrappers
# the following are wrappers around the base crypt algorithms,
# which add the ldap required {CRYPT} prefix
-
+#=========================================================
ldap_crypt_schemes = [ 'ldap_' + name for name in unix_crypt_schemes ]
def _init_ldap_crypt_handlers():
- #XXX: it's not nice to play in globals like this,
- # but don't want to write all all these handlers
+ # NOTE: I don't like to implicitly modify globals() like this,
+ # but don't want to write out all these handlers out either :)
g = globals()
for wname in unix_crypt_schemes:
name = 'ldap_' + wname