Adding support for Base64 format of md5, sha1, sha256 and sha512 hashes (Issue #1881)

This commit is contained in:
Miroslav Stampar
2017-10-28 22:40:55 +02:00
parent 9ae713bcec
commit 5497a6e58d
2 changed files with 30 additions and 20 deletions

View File

@@ -138,6 +138,10 @@ class HASH:
SSHA512 = r'\A\{SSHA512\}[a-zA-Z0-9+/]+={0,2}\Z'
DJANGO_MD5 = r'\Amd5\$[^$]+\$[0-9a-f]{32}\Z'
DJANGO_SHA1 = r'\Asha1\$[^$]+\$[0-9a-f]{40}\Z'
MD5_BASE64 = r'\A[a-zA-Z0-9+/]{22}==\Z'
SHA1_BASE64 = r'\A[a-zA-Z0-9+/]{27}=\Z'
SHA256_BASE64 = r'\A[a-zA-Z0-9+/]{43}=\Z'
SHA512_BASE64 = r'\A[a-zA-Z0-9+/]{86}==\Z'
# Reference: http://www.zytrax.com/tech/web/mobile_ids.html
class MOBILES: