pub trait Sponge:
Clone
+ Debug
+ Default
+ Send
+ Sync {
const RATE: usize;
// Required methods
fn init() -> Self;
fn absorb(&mut self, input: [BFieldElement; 10]);
fn squeeze(&mut self) -> [BFieldElement; 10];
// Provided method
fn pad_and_absorb_all(&mut self, input: &[BFieldElement]) { ... }
}
Expand description
A cryptographic sponge. Should only be based on a cryptographic permutation, e.g.,
Tip5
.
Required Associated Constants§
Required Methods§
fn init() -> Self
fn absorb(&mut self, input: [BFieldElement; 10])
fn squeeze(&mut self) -> [BFieldElement; 10]
Provided Methods§
fn pad_and_absorb_all(&mut self, input: &[BFieldElement])
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.