Skip to main content

HashMany

Trait HashMany 

Source
pub trait HashMany {
    type Input;
    type Output;

    // Required method
    fn hash_many(
        &self,
        input: &[Self::Input],
        num_outputs: u16,
    ) -> Vec<Self::Output>;
}
Expand description

A trait for a hash function that produces multiple outputs.

Required Associated Types§

Required Methods§

Source

fn hash_many( &self, input: &[Self::Input], num_outputs: u16, ) -> Vec<Self::Output>

Returns the hash of the given input.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

fn hash_many( &self, input: &[<Poseidon<E, RATE> as HashMany>::Input], num_outputs: u16, ) -> Vec<<Poseidon<E, RATE> as HashMany>::Output>

Returns the cryptographic hash for a list of field elements as input, and returns the specified number of field elements as output.

Source§

type Input = Field<E>

Source§

type Output = Field<E>

Implementors§