[−][src]Trait snarkvm_models::algorithms::merkle_tree::MerkleParameters
Associated Types
Loading content...Associated Constants
Loading content...Required methods
pub fn setup<R: Rng>(rng: &mut R) -> Self
[src]
Setup the MerkleParameters
pub fn crh(&self) -> &Self::H
[src]
Returns the collision-resistant hash function used by the Merkle tree.
pub fn parameters(&self) -> &<Self::H as CRH>::Parameters
[src]
Returns the collision-resistant hash function parameters used by the Merkle tree.
Provided methods
pub fn hash_leaf<L: ToBytes>(
&self,
leaf: &L,
buffer: &mut [u8]
) -> Result<<Self::H as CRH>::Output, MerkleError>
[src]
&self,
leaf: &L,
buffer: &mut [u8]
) -> Result<<Self::H as CRH>::Output, MerkleError>
Returns the hash of a given leaf.
pub fn hash_inner_node(
&self,
left: &<Self::H as CRH>::Output,
right: &<Self::H as CRH>::Output,
buffer: &mut [u8]
) -> Result<<Self::H as CRH>::Output, MerkleError>
[src]
&self,
left: &<Self::H as CRH>::Output,
right: &<Self::H as CRH>::Output,
buffer: &mut [u8]
) -> Result<<Self::H as CRH>::Output, MerkleError>
Returns the output hash, given a left and right hash value.