pub trait Hash {
    type Input;
    type Output;

    // Required method
    fn hash(&self, input: &[Self::Input]) -> Result<Self::Output, Error>;
}
Expand description

A trait for a hash function.

Required Associated Types§

type Input

type Output

Required Methods§

fn hash(&self, input: &[Self::Input]) -> Result<Self::Output, Error>

Returns the hash of the given input.

Implementors§

source§

impl<E: Environment, const NUM_BITS: u8> Hash for Pedersen<E, NUM_BITS>

§

type Input = bool

§

type Output = Field<E>

source§

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

§

type Input = bool

§

type Output = Field<E>

source§

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

§

type Input = Field<E>

§

type Output = Field<E>

source§

impl<const TYPE: u8, const VARIANT: usize> Hash for Keccak<TYPE, VARIANT>

§

type Input = bool

§

type Output = Vec<bool>