Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
|
Public Member Functions | |
def | __init__ (self, MiMCBase compression_fn, int iv=DEFAULT_IV_UINT256) |
int | hash (self, List[int] values) |
Note that this is currently experimental code. Hash a series of field elements via the Merkle-Damgard construction on a MiMC compression function. Note that since this function only accepts whole numbers of scalar field elements, there is no ambiguity w.r.t to padding and we could technically omit the finalization step. It has been kept for now, to allow time for further consideration, and in case the form of the hasher changes (e.g. in case we want to be able to hash arbitrary bit strings in the future).
Definition at line 16 of file input_hasher.py.
def zeth.core.input_hasher.InputHasher.__init__ | ( | self, | |
MiMCBase | compression_fn, | ||
int | iv = DEFAULT_IV_UINT256 |
||
) |
Definition at line 27 of file input_hasher.py.
int zeth.core.input_hasher.InputHasher.hash | ( | self, | |
List[int] | values | ||
) |
Definition at line 32 of file input_hasher.py.