eth-hash0.8.0
eth-hash0.8.0
Published
eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3
pip install eth-hash
Package Downloads
Authors
Project URLs
Requires Python
<4,>=3.10
Dependencies
build>=0.9.0bump_my_version>=0.19.0ipythonmypy==1.18.2pre-commit>=3.4.0tox>=4.0.0twinewheel>=0.38.1sphinx>=6.0.0sphinx-autobuild>=2021.3.14sphinx_rtd_theme>=1.0.0towncrier<25,>=24pytest>=7.0.0pytest-xdist>=2.4.0
eth-hash
The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3
Note: the similarly named pyethash has a completely different use: it generates proofs of work.
This is a low-level library, intended to be used internally by other Ethereum tools.
If you're looking for a convenient hashing tool, check out
eth_utils.keccak()
which will be a little friendlier, and provide access to other helpful utilities.
Read the documentation.
Installation
python -m pip install "eth-hash[pycryptodome]"
>>> from eth_hash.auto import keccak
>>> keccak(b'')
b"\xc5\xd2F\x01\x86\xf7#<\x92~}\xb2\xdc\xc7\x03\xc0\xe5\x00\xb6S\xca\x82';{\xfa\xd8\x04]\x85\xa4p"
See the docs for more about choosing and installing backends.