Skip to content

The Ethereum hashing function, keccak256, sometimes (erroneously) called sha256 or sha3

License

Notifications You must be signed in to change notification settings

ethereum/eth-hash

Repository files navigation

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.

About

The Ethereum hashing function, keccak256, sometimes (erroneously) called sha256 or sha3

Resources

License

Stars

Watchers

Forks

Packages

No packages published