7 lines
128 B
Python
7 lines
128 B
Python
|
import hashlib
|
||
|
|
||
|
def sha256(secret):
|
||
|
preimage = secret.encode('utf8')
|
||
|
h = hashlib.sha256(preimage).digest()
|
||
|
return h
|