pysha3 is pretty old and doesn't seem to have any modern Python wheels, so it requires being compiled on Python 3.7 or newer. Cryptodome is more modern and maintained, though larger.pull/103/head
parent
14c96dfb7f
commit
f2df61585b
@ -0,0 +1,10 @@
|
||||
from Cryptodome.Hash import keccak
|
||||
|
||||
|
||||
def keccak_256(data):
|
||||
"""
|
||||
Return a hashlib-compatible Keccak 256 object for the given data.
|
||||
"""
|
||||
hash = keccak.new(digest_bits=256)
|
||||
hash.update(data)
|
||||
return hash
|
Loading…
Reference in new issue