mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Python: Model hashing operations in cryptography package
This commit is contained in:
@@ -4,7 +4,7 @@ from binascii import hexlify
|
||||
|
||||
|
||||
hasher = hashes.Hash(hashes.MD5())
|
||||
hasher.update(b"secret message") # $ MISSING: CryptographicOperation CryptographicOperationInput=b"secret message" CryptographicOperationAlgorithm=MD5
|
||||
hasher.update(b"secret message") # $ CryptographicOperation CryptographicOperationInput=b"secret message" CryptographicOperationAlgorithm=MD5
|
||||
|
||||
digest = hasher.finalize()
|
||||
print(hexlify(digest).decode('utf-8'))
|
||||
|
||||
Reference in New Issue
Block a user