pub trait MerkleParameters: Clone + Debug + Send + Sync {
    type H: CRH;

    const DEPTH: usize;

    fn setup(message: &str) -> Self;
fn setup_message(&self) -> &str;
fn crh(&self) -> &Self::H; fn hash_leaf<L: ToBytes>(
        &self,
        leaf: &L
    ) -> Result<<Self::H as CRH>::Output, MerkleError> { ... }
fn hash_inner_node(
        &self,
        left: &<Self::H as CRH>::Output,
        right: &<Self::H as CRH>::Output
    ) -> Result<<Self::H as CRH>::Output, MerkleError> { ... }
fn hash_empty(&self) -> Result<<Self::H as CRH>::Output, MerkleError> { ... } }

Associated Types

Associated Constants

Required methods

Setup the MerkleParameters

Returns the saved message from calling the MerkleParameters::setup() function.

Returns the collision-resistant hash function used by the Merkle tree.

Provided methods

Returns the hash of a given leaf.

Returns the output hash, given a left and right hash value.

Implementors