darkfi_sdk::crypto::smt::util

Trait FieldHasher

Source
pub trait FieldHasher<F: WithSmallOrderMulGroup<3> + Ord, const L: usize>: Clone {
    // Required methods
    fn hash(&self, inputs: [F; L]) -> F;
    fn hasher() -> Self;
}

Required Methods§

Source

fn hash(&self, inputs: [F; L]) -> F

Source

fn hasher() -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<F: WithSmallOrderMulGroup<3> + Ord, const L: usize> FieldHasher<F, L> for Poseidon<F, L>
where P128Pow5T3: Spec<F, 3, 2>,