7 lines
220 B
Python
7 lines
220 B
Python
|
import cryptography.hazmat.primitives.hashes
|
||
|
|
||
|
|
||
|
def get_hash(data):
|
||
|
digest = cryptography.hazmat.primitives.hashes.Hash(cryptography.hazmat.primitives.hashes.SHA256())
|
||
|
digest.update(data)
|
||
|
return digest.finalize().hex()
|