@@ -0,0 +1,9 @@
import hashlib
from Crypto.Cipher import DES
def weak_hash(data):
return hashlib.md5(data.encode()).hexdigest() # weak hash (CWE-327/328)
def encrypt(data, key):
cipher = DES.new(key, DES.MODE_ECB) # weak cipher (CWE-327)
return cipher.encrypt(data)
The note is not visible to the blocked user.