LeafHash

Trait LeafHash 

Source
pub trait LeafHash {
    type Hash: Default + Inject + Eject + Ternary;
    type Leaf;

    // Required method
    fn hash_leaf(&self, leaf: &Self::Leaf) -> Self::Hash;
}
Expand description

A trait for a Merkle leaf hash function.

Required Associated Types§

Required Methods§

Source

fn hash_leaf(&self, leaf: &Self::Leaf) -> Self::Hash

Returns the hash of the given leaf node.

Implementors§

Source§

impl<E, const NUM_WINDOWS: u8, const WINDOW_SIZE: u8> LeafHash for BHP<E, NUM_WINDOWS, WINDOW_SIZE>
where E: Environment,

Source§

impl<E, const RATE: usize> LeafHash for Poseidon<E, RATE>
where E: Environment,

Source§

impl<E, const TYPE: u8, const VARIANT: usize> LeafHash for Keccak<E, TYPE, VARIANT>
where E: Environment,

Source§

type Hash = BooleanHash<E, VARIANT>

Source§

type Leaf = Vec<Boolean<E>>