[][src]Struct r1cs::MerkleDamgard

pub struct MerkleDamgard<F: Field, CF: CompressionFunction<F>> { /* fields omitted */ }

A hash function based on the Merkle–Damgård construction.

Methods

impl<F: Field, CF: CompressionFunction<F>> MerkleDamgard<F, CF>[src]

pub fn new(initial_value: Element<F>, compress: CF) -> Self[src]

Creates a Merkle–Damgård hash function from the given initial value and one-way compression function.

pub fn new_defaults(compress: CF) -> Self[src]

Creates a Merkle–Damgård hash function from the given one-way compression function. Uses a simple LCG (seeded with 0) as a source of randomness for the initial value.

Trait Implementations

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

Auto Trait Implementations

impl<F, CF> !Send for MerkleDamgard<F, CF>

impl<F, CF> !Sync for MerkleDamgard<F, CF>

impl<F, CF> Unpin for MerkleDamgard<F, CF> where
    CF: Unpin

impl<F, CF> UnwindSafe for MerkleDamgard<F, CF> where
    CF: UnwindSafe,
    F: RefUnwindSafe

impl<F, CF> RefUnwindSafe for MerkleDamgard<F, CF> where
    CF: RefUnwindSafe,
    F: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]