pub trait Safe<T, const W: usize>{
// Required methods
fn permute(&mut self, state: &mut [T; W]);
fn tag(&mut self, input: &[u8]) -> T;
fn add(&mut self, right: &T, left: &T) -> T;
// Provided method
fn initialized_state(tag: T) -> [T; W] { ... }
}Expand description
This trait defines the behavior of a sponge algorithm.
Note: The trait’s specific implementation of addition enables usage within zero-knowledge circuits.
Required Methods§
Provided 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.