eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3
Project Links
Meta
Author: The Ethereum Foundation
Requires Python: >=3.8, <4
Classifiers
Development Status
- 3 - Alpha
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Natural Language
- English
Programming Language
- Python :: 3
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
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.
Jan 13, 2025
0.7.1
Mar 01, 2024
0.7.0
Jan 10, 2024
0.6.0
Jun 07, 2023
0.5.2
Nov 09, 2022
0.5.1
Jul 20, 2022
0.5.0
Jul 06, 2022
0.4.0
Jun 30, 2022
0.3.3
Sep 03, 2021
0.3.2
Jan 21, 2021
0.3.1
Jan 20, 2021
0.3.0
Sep 05, 2018
0.2.0
May 29, 2018
0.1.4
May 14, 2018
0.1.3
Apr 02, 2018
0.1.2
Mar 15, 2018
0.1.1
Feb 28, 2018
0.1.0
Feb 21, 2018
0.1.0a4
Feb 08, 2018
0.1.0a3
Feb 07, 2018
0.1.0a2