eth_hash.backends package

Submodules

eth_hash.backends.auto module

class eth_hash.backends.auto.AutoBackend

Bases: BackendAPI

keccak256(in_data: bytearray | bytes) bytes
preimage(in_data: bytearray | bytes) PreImageAPI

eth_hash.backends.pycryptodome module

class eth_hash.backends.pycryptodome.CryptodomeBackend

Bases: BackendAPI

keccak256(prehash: bytearray | bytes) bytes
preimage(prehash: bytearray | bytes) PreImageAPI
class eth_hash.backends.pycryptodome.CryptodomePreimage(prehash: bytes)

Bases: PreImageAPI

copy() CryptodomePreimage
digest() bytes
update(prehash: bytes) None
eth_hash.backends.pycryptodome.keccak256(prehash: bytearray | bytes) bytes
eth_hash.backends.pycryptodome.preimage(prehash: bytearray | bytes) PreImageAPI

eth_hash.backends.pysha3 module

class eth_hash.backends.pysha3.PySha3Backend

Bases: BackendAPI

keccak256(prehash: bytearray | bytes) bytes
preimage(prehash: bytearray | bytes) PreImageAPI
class eth_hash.backends.pysha3.Pysha3Preimage(prehash: bytes)

Bases: PreImageAPI

copy() Pysha3Preimage
digest() bytes
update(prehash: bytes) None
eth_hash.backends.pysha3.keccak256(prehash: bytearray | bytes) bytes
eth_hash.backends.pysha3.preimage(prehash: bytearray | bytes) PreImageAPI

Module contents

A collection of optional backends that implement hashing.

You must manually select and install the backend you want. If the backend is not installed, then trying to import the module for that backend will cause an ImportError.

See Choose a hashing backend for more.