
hashlib is not the only module to provide MD5 hashes. PyCrypto and pyca/cryptography also have functions to do MD5 hashes. This patch adds those to the md5 blacklist_calls list. This patch also adds PyCrypto's MD2 and MD4. Change-Id: Icd55365f1f7a4cbb34dcb55abc0d77ab8a75f575
19 lines
381 B
Python
19 lines
381 B
Python
from cryptography.hazmat.primitives import hashes
|
|
from Crypto.Hash import MD2 as pycrypto_md2
|
|
from Crypto.Hash import MD4 as pycrypto_md4
|
|
from Crypto.Hash import MD5 as pycrypto_md5
|
|
import hashlib
|
|
|
|
hashlib.md5(1)
|
|
hashlib.md5(1).hexdigest()
|
|
|
|
abc = str.replace(hashlib.md5("1"), "###")
|
|
|
|
print(hashlib.md5("1"))
|
|
|
|
pycrypto_md2.new()
|
|
pycrypto_md4.new()
|
|
pycrypto_md5.new()
|
|
|
|
hashes.MD5()
|