eth-hash0.7.1
eth-hash0.7.1
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.8
Dependencies
- build
>=0.9.0; extra == "dev"
- bump_my_version
>=0.19.0; extra == "dev"
- ipython
; extra == "dev"
- mypy
==1.10.0; extra == "dev"
- pre-commit
>=3.4.0; extra == "dev"
- tox
>=4.0.0; extra == "dev"
- twine
; extra == "dev"
- wheel
; extra == "dev"
- sphinx
>=6.0.0; extra == "dev"
- sphinx-autobuild
>=2021.3.14; extra == "dev"
- sphinx_rtd_theme
>=1.0.0; extra == "dev"
- towncrier
<25,>=24; extra == "dev"
- pytest
>=7.0.0; extra == "dev"
- pytest-xdist
>=2.4.0; extra == "dev"
- sphinx
>=6.0.0; extra == "docs"
- sphinx-autobuild
>=2021.3.14; extra == "docs"
- sphinx_rtd_theme
>=1.0.0; extra == "docs"
- towncrier
<25,>=24; extra == "docs"
- pytest
>=7.0.0; extra == "test"
- pytest-xdist
>=2.4.0; extra == "test"
- pycryptodome
<4,>=3.6.6; extra == "pycryptodome"
- pysha3
<2.0.0,>=1.0.0; python_version < "3.9" and extra == "pysha3"
- safe-pysha3
>=1.0.0; python_version >= "3.9" and extra == "pysha3"
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.