Trait snarkvm_console_network::HashToGroup
source · pub trait HashToGroup {
type Input;
type Output;
fn hash_to_group(&self, input: &[Self::Input]) -> Result<Self::Output, Error>;
}
Expand description
A trait for a hash function that projects the value to an affine group element.
Required Associated Types
Required Methods
Implementations on Foreign Types
sourceimpl<E, const RATE: usize> HashToGroup for Poseidon<E, RATE>where
E: Environment,
impl<E, const RATE: usize> HashToGroup for Poseidon<E, RATE>where
E: Environment,
sourcefn hash_to_group(
&self,
input: &[<Poseidon<E, RATE> as HashToGroup>::Input]
) -> Result<<Poseidon<E, RATE> as HashToGroup>::Output, Error>
fn hash_to_group(
&self,
input: &[<Poseidon<E, RATE> as HashToGroup>::Input]
) -> Result<<Poseidon<E, RATE> as HashToGroup>::Output, Error>
Returns a group element from hashing the input.