Package genlayer.py.keccak
Warning
This is an internal module
Implements keccak hash
Source code is taken from ctz/keccak (Apache 2.0 license)
-
genlayer.py.keccak.Keccak256(initial_input: Buffer | None = None)
Default preset for Keccak hash that is the same as one used in eth
-
class genlayer.py.keccak.KeccakHash[source]
The Keccak hash function, with a hashlib-compatible interface.
-
__init__(bitrate_bits, capacity_bits, output_bits)[source]
-
__repr__()[source]
Return repr(self).
-
static preset(bitrate_bits, capacity_bits, output_bits)[source]
Returns a factory function for the given bitrate, sponge capacity and output length.
The function accepts an optional initial input, ala hashlib.