[][src]Trait iota_crypto::Sponge

pub trait Sponge where
    Self: Default + Clone + Send + 'static, 
{ fn absorb(&mut self, trits: &[i8]) -> Result<(), Error>;
fn squeeze(&mut self, out: &mut [i8]) -> Result<(), Error>;
fn reset(&mut self); }

The sponge trait specifys the main functionality of all sponges used throughout IOTA

Required methods

fn absorb(&mut self, trits: &[i8]) -> Result<(), Error>

Absorb trits into the sponge

  • trits - A slice of trits whose length is a multiple of 243

fn squeeze(&mut self, out: &mut [i8]) -> Result<(), Error>

Squeeze trits out of the sponge and copy them into out

  • out - A slice of trits whose length is a multiple of 243

fn reset(&mut self)

Reset the sponge to initial state

Loading content...

Implementors

impl Sponge for Curl[src]

impl Sponge for Kerl[src]

Loading content...