2024-11-17 00:53:34 +00:00
|
|
|
import cryptography.hazmat.primitives.hashes
|
|
|
|
|
|
|
|
|
|
|
|
def get_hash(data):
|
|
|
|
digest = cryptography.hazmat.primitives.hashes.Hash(cryptography.hazmat.primitives.hashes.SHA256())
|
|
|
|
digest.update(data)
|
2024-11-20 01:49:03 +00:00
|
|
|
return digest.finalize().hex()
|