Modules§
Macros§
Structs§
- Merkle
Hasher - Provides a Merkle-root hasher that allows for streaming bytes (i.e., providing any-length byte
slices without need to separate into leaves). Efficiently handles cases where not all leaves
have been provided by assuming all non-provided leaves are
[0; 32]
and pre-computing the zero-value hashes at all depths of the tree.
Enums§
Constants§
Traits§
Functions§
- merkle_
root - Convenience method for
MerkleHasher
which also provides some fast-paths for small trees. - merkleize_
padded - Merkleize
bytes
and return the root, optionally padding the tree out tomin_leaves
number of leaves. - merkleize_
standard - Merkleizes bytes and returns the root, using a simple algorithm that does not optimize to avoid processing or storing padding bytes.
- mix_
in_ length - Returns the node created by hashing
root
andlength
. - mix_
in_ selector - Returns
Some(root)
created by hashingroot
andselector
, ifselector <= MAX_UNION_SELECTOR
. Otherwise, returnsNone
.