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§

source

type Hash: Default + Inject + Eject + Ternary

source

type Leaf

Required Methods§

source

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

Returns the hash of the given leaf node.

Implementations on Foreign Types§

source§

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

source§

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

Returns the hash of the given leaf node.

§

type Hash = Field<E>

§

type Leaf = Vec<Boolean<E>>

source§

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

source§

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

Returns the hash of the given leaf node.

§

type Hash = Field<E>

§

type Leaf = Vec<Field<E>>

source§

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

source§

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

Returns the hash of the given leaf node.

§

type Hash = BooleanHash<E, VARIANT>

§

type Leaf = Vec<Boolean<E>>

Implementors§