Trait ark_crypto_primitives::crh::TwoToOneCRH[][src]

pub trait TwoToOneCRH {
    type Output: ToBytes + Clone + Eq + Debug + Hash + Default + CanonicalSerialize + CanonicalDeserialize;
    type Parameters: Clone + Default;

    const LEFT_INPUT_SIZE_BITS: usize;
    const RIGHT_INPUT_SIZE_BITS: usize;

    fn setup<R: Rng>(r: &mut R) -> Result<Self::Parameters, Error>;
fn evaluate(
        parameters: &Self::Parameters,
        left_input: &[u8],
        right_input: &[u8]
    ) -> Result<Self::Output, Error>; }

Associated Types

Associated Constants

The bit size of the left input.

The bit size of the right input.

Required methods

Evaluates this CRH on the left and right inputs.

Panics

If left_input.len() != Self::LEFT_INPUT_SIZE_BITS, or if right_input.len() != Self::RIGHT_INPUT_SIZE_BITS, then this method panics.

Implementors

A simple implementation method: just concat the left input and right input together

evaluate requires that left_input and right_input are of equal length.

A simple implementation method: just concat the left input and right input together

evaluate requires that left_input and right_input are of equal length.

A simple implementation of TwoToOneCRH by asserting left and right input has same length and chain them together.