mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
This PR was rebased on newest main, but was written a long time ago when all the framework test-files were still in experimental. I have not re-written my local git-history, since there are MANY updates to those files (and I dare not risk it).
11 lines
566 B
Python
11 lines
566 B
Python
from Crypto.Hash import MD5
|
|
|
|
hasher = MD5.new(b"secret message") # $ CryptographicOperation CryptographicOperationInput=b"secret message" CryptographicOperationAlgorithm=MD5
|
|
print(hasher.hexdigest())
|
|
|
|
|
|
hasher = MD5.new() # $ CryptographicOperation CryptographicOperationAlgorithm=MD5
|
|
hasher.update(b"secret") # $ CryptographicOperation CryptographicOperationInput=b"secret" CryptographicOperationAlgorithm=MD5
|
|
hasher.update(b" message") # $ CryptographicOperation CryptographicOperationInput=b" message" CryptographicOperationAlgorithm=MD5
|
|
print(hasher.hexdigest())
|