pub trait FieldBasedCryptographicSponge<CF: PrimeField>: CryptographicSponge {
// Required method
fn squeeze_native_field_elements(&mut self, num_elements: usize) -> Vec<CF>;
// Provided method
fn squeeze_native_field_elements_with_sizes(
&mut self,
sizes: &[FieldElementSize],
) -> Vec<CF> { ... }
}Expand description
The interface for field-based cryptographic sponge.
CF is the native field used by the cryptographic sponge implementation.
Required Methods§
Sourcefn squeeze_native_field_elements(&mut self, num_elements: usize) -> Vec<CF>
fn squeeze_native_field_elements(&mut self, num_elements: usize) -> Vec<CF>
Squeeze num_elements field elements from the sponge.
Provided Methods§
Sourcefn squeeze_native_field_elements_with_sizes(
&mut self,
sizes: &[FieldElementSize],
) -> Vec<CF>
fn squeeze_native_field_elements_with_sizes( &mut self, sizes: &[FieldElementSize], ) -> Vec<CF>
Squeeze sizes.len() field elements from the sponge, where the i-th element of
the output has size sizes[i].
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.