px
pypx

eth-hash

v0.8.0

eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3

8 KB Python 3.10+ py3-none-anyMIT License
Diff
$ uv add eth-hash

eth-hash

Join the conversation on Discord Build Status PyPI version Python versions Docs build

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.

View the change log.

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.

Details

Version
0.8.0
License
MIT License
Python
<4,>=3.10
Maintainer
The Ethereum Foundation

Release Cadence

2
releases in the past year
avg 141 days between releases

Maintainers