mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
Official names are SHA3-224, SHA3-256, SHA3-384, SHA3-512 as per https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf
11 lines
597 B
Python
11 lines
597 B
Python
from Crypto.Hash import SHA3_224
|
|
|
|
hasher = SHA3_224.new(b"secret message") # $ CryptographicOperation CryptographicOperationInput=b"secret message" CryptographicOperationAlgorithm=SHA3224
|
|
print(hasher.hexdigest())
|
|
|
|
|
|
hasher = SHA3_224.new() # $ CryptographicOperation CryptographicOperationAlgorithm=SHA3224
|
|
hasher.update(b"secret") # $ CryptographicOperation CryptographicOperationInput=b"secret" CryptographicOperationAlgorithm=SHA3224
|
|
hasher.update(b" message") # $ CryptographicOperation CryptographicOperationInput=b" message" CryptographicOperationAlgorithm=SHA3224
|
|
print(hasher.hexdigest())
|