[][src]Trait r1cs::HashFunction

pub trait HashFunction<F: Field> {
    fn hash(
        &self,
        builder: &mut GadgetBuilder<F>,
        blocks: &[Expression<F>]
    ) -> Expression<F>; fn hash_evaluate(&self, blocks: &[Element<F>]) -> Element<F> { ... } }

A function which hashes a sequence of field elements, outputting a single field element.

Required methods

fn hash(
    &self,
    builder: &mut GadgetBuilder<F>,
    blocks: &[Expression<F>]
) -> Expression<F>

Loading content...

Provided methods

fn hash_evaluate(&self, blocks: &[Element<F>]) -> Element<F>

Like hash, but actually evaluates the hash function rather than just adding it to a GadgetBuilder.

Loading content...

Implementors

impl<F: Field, C: CompressionFunction<F>> HashFunction<F> for MerkleDamgard<F, C>[src]

Loading content...