Sponge

Trait Sponge 

Source
pub trait Sponge
where Self: Default + Clone,
{ type Item; // Required methods fn absorb(&mut self, input: &[Self::Item]); fn squeeze(&mut self, output: &mut [Self::Item]); fn reset(&mut self); // Provided method fn digest(&mut self, input: &[Self::Item], output: &mut [Self::Item]) { ... } }

Required Associated Types§

Required Methods§

Source

fn absorb(&mut self, input: &[Self::Item])

Absorb trits into the sponge

Source

fn squeeze(&mut self, output: &mut [Self::Item])

Squeeze trits out of the sponge and copy them into out

Source

fn reset(&mut self)

Reset the sponge to initial state

Provided Methods§

Source

fn digest(&mut self, input: &[Self::Item], output: &mut [Self::Item])

Digest inputs and then compute the hash with length of provided output slice

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§