fixed CRYPT

This commit is contained in:
mdipierro
2012-07-20 08:58:13 -05:00
parent ff05f5d121
commit f905a6e9dc
4 changed files with 29 additions and 9 deletions
+6 -6
View File
@@ -72,12 +72,12 @@ def get_digest(value):
raise ValueError("Invalid digest algorithm")
DIGEST_ALG_BY_SIZE = {
128/16: 'md5',
160/16: 'sha1',
224/16: 'sha224',
256/16: 'sha256',
384/16: 'sha384',
512/16: 'sha512',
128/4: 'md5',
160/4: 'sha1',
224/4: 'sha224',
256/4: 'sha256',
384/4: 'sha384',
512/4: 'sha512',
}
def hmac_hash(value, salt, digest_alg='md5'):