Trait neptune::sponge::api::SpongeAPI

source ·
pub trait SpongeAPI<F: PrimeField, A: Arity<F>> {
    type Acc;
    type Value;

    // Required methods
    fn start(
        &mut self,
        p: IOPattern,
        domain_separator: Option<u32>,
        _: &mut Self::Acc,
    );
    fn absorb(
        &mut self,
        length: u32,
        elements: &[Self::Value],
        acc: &mut Self::Acc,
    );
    fn squeeze(&mut self, length: u32, acc: &mut Self::Acc) -> Vec<Self::Value>;
    fn finish(&mut self, _: &mut Self::Acc) -> Result<(), Error>;
}

Required Associated Types§

Required Methods§

source

fn start( &mut self, p: IOPattern, domain_separator: Option<u32>, _: &mut Self::Acc, )

Optional domain_separator defaults to 0

source

fn absorb(&mut self, length: u32, elements: &[Self::Value], acc: &mut Self::Acc)

source

fn squeeze(&mut self, length: u32, acc: &mut Self::Acc) -> Vec<Self::Value>

source

fn finish(&mut self, _: &mut Self::Acc) -> Result<(), Error>

Implementors§

source§

impl<F: PrimeField, A: Arity<F>, S: InnerSpongeAPI<F, A>> SpongeAPI<F, A> for S

§

type Acc = <S as InnerSpongeAPI<F, A>>::Acc

§

type Value = <S as InnerSpongeAPI<F, A>>::Value