Trait snarkvm_algorithms::traits::crh::CRH[][src]

pub trait CRH: Clone + From<Self::Parameters> {
    type Output: Clone + Debug + Display + ToBytes + FromBytes + Eq + Hash + Default;
    type Parameters: CRHParameters;

    const INPUT_SIZE_BITS: usize;

    fn setup<R: Rng>(r: &mut R) -> Self;
fn hash(&self, input: &[u8]) -> Result<Self::Output, CRHError>;
fn parameters(&self) -> &Self::Parameters; }

Associated Types

Loading content...

Associated Constants

Loading content...

Required methods

fn setup<R: Rng>(r: &mut R) -> Self[src]

fn hash(&self, input: &[u8]) -> Result<Self::Output, CRHError>[src]

fn parameters(&self) -> &Self::Parameters[src]

Loading content...

Implementors

impl<G: Group + ProjectiveCurve, S: PedersenSize> CRH for BoweHopwoodPedersenCompressedCRH<G, S>[src]

type Output = <G::Affine as AffineCurve>::BaseField

type Parameters = PedersenCRHParameters<G, S>

impl<G: Group + ProjectiveCurve, S: PedersenSize> CRH for PedersenCompressedCRH<G, S>[src]

type Output = <G::Affine as AffineCurve>::BaseField

type Parameters = PedersenCRHParameters<G, S>

fn hash(&self, input: &[u8]) -> Result<Self::Output, CRHError>[src]

Returns the affine x-coordinate as the collision-resistant hash output.

impl<G: Group, S: PedersenSize> CRH for BoweHopwoodPedersenCRH<G, S>[src]

type Output = G

type Parameters = PedersenCRHParameters<G, S>

impl<G: Group, S: PedersenSize> CRH for PedersenCRH<G, S>[src]

type Output = G

type Parameters = PedersenCRHParameters<G, S>

Loading content...