Mercurial > p > roundup > code
diff roundup/password.py @ 4982:9ba03348f923
Remove roundup/anypy/hashlib_.py
The hashlib_ module was being used to provide backwards compatibility
for python v2.4. Roundup has dropped support for python v2.4 so we can
get rid of it.
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Fri, 09 May 2014 17:32:44 +1000 |
| parents | efdce3d32698 |
| children | 9792b18e0b19 |
line wrap: on
line diff
--- a/roundup/password.py Sun May 11 01:05:58 2014 +1000 +++ b/roundup/password.py Fri May 09 17:32:44 2014 +1000 @@ -21,7 +21,8 @@ import re, string, random from base64 import b64encode, b64decode -from roundup.anypy.hashlib_ import md5, sha1, shamodule +from hashlib import md5, sha1 + try: import crypt except ImportError: @@ -65,7 +66,7 @@ def _pbkdf2(password, salt, rounds, keylen): digest_size = 20 # sha1 generates 20-byte blocks total_blocks = int((keylen+digest_size-1)/digest_size) - hmac_template = HMAC(password, None, shamodule) + hmac_template = HMAC(password, None, sha1) out = _bempty for i in xrange(1, total_blocks+1): hmac = hmac_template.copy()
