chainlib/cic_tools/eth/hash.py
2021-02-08 10:39:42 +01:00

8 lines
122 B
Python

import sha3
def keccak256_hex(s):
h = sha3.keccak_256()
h.update(s.encode('utf-8'))
return h.digest().hex()