chainlib/cic_tools/eth/hash.py

8 lines
122 B
Python
Raw Normal View History

2021-02-08 10:39:42 +01:00
import sha3
def keccak256_hex(s):
h = sha3.keccak_256()
h.update(s.encode('utf-8'))
return h.digest().hex()