pub trait Sponge<Input: Field, Digest> {
    // Required methods
    fn new(params: &'static ArithmeticSpongeParams<Input>) -> Self;
    fn absorb(&mut self, x: &[Input]);
    fn squeeze(&mut self) -> Digest;
    fn reset(&mut self);
}
Expand description

Cryptographic sponge interface - for hashing an arbitrary amount of data into one or more field elements

Required Methods§

source

fn new(params: &'static ArithmeticSpongeParams<Input>) -> Self

Create a new cryptographic sponge using arithmetic sponge params

source

fn absorb(&mut self, x: &[Input])

Absorb an array of field elements x

source

fn squeeze(&mut self) -> Digest

Squeeze an output from the sponge

source

fn reset(&mut self)

Reset the sponge back to its initial state (as if it were just created)

Implementors§

source§

impl<F: Field, SC: SpongeConstants> Sponge<F, F> for ArithmeticSponge<F, SC>