pub trait DuplexSpongeInterface {
// Required methods
fn new(iv: [u8; 32]) -> Self;
fn absorb(&mut self, input: &[u8]);
fn squeeze(&mut self, length: usize) -> Vec<u8> ⓘ;
fn ratchet(&mut self);
}
Expand description
A trait defining the behavior of a duplex sponge construction.
A duplex sponge allows for:
- Absorbing input data into the sponge state
- Squeezing output data from the sponge state
This is the core primitive used for building cryptographic codecs.
Required Methods§
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.