pub trait Sponge<F: Field> {
type Digest;
// Required methods
fn hash(bytes: &[u8]) -> Self::Digest;
fn hash_field(elems: &[F]) -> Self::Digest;
fn merge(digests: &[Self::Digest; 2]) -> Self::Digest;
}
Expand description
Trait for implementing a Sponge construction.
Required Associated Types§
Required Methods§
Sourcefn hash_field(elems: &[F]) -> Self::Digest
fn hash_field(elems: &[F]) -> Self::Digest
Returns a hash of the provided sequence of field elements.
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.