pub trait AbsorbWithLength: Absorb {
// Required method
fn absorb_length(&self) -> usize;
// Provided methods
fn to_sponge_bytes_with_length(&self, dest: &mut Vec<u8>) { ... }
fn to_sponge_field_elements_with_length<F: PrimeField>(
&self,
dest: &mut Vec<F>,
) { ... }
}Expand description
An extension to Absorb that is specific to items with variable length, such as a list.
Required Methods§
Sourcefn absorb_length(&self) -> usize
fn absorb_length(&self) -> usize
The length of the self being absorbed.
Provided Methods§
Sourcefn to_sponge_bytes_with_length(&self, dest: &mut Vec<u8>)
fn to_sponge_bytes_with_length(&self, dest: &mut Vec<u8>)
Converts the object into a list of bytes along with its length information
that can be absorbed by a CryptographicSponge.
Append the list to dest.
Sourcefn to_sponge_field_elements_with_length<F: PrimeField>(&self, dest: &mut Vec<F>)
fn to_sponge_field_elements_with_length<F: PrimeField>(&self, dest: &mut Vec<F>)
Converts the object into field elements along with its length information
that can be absorbed by a CryptographicSponge.
Append the list to dest
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.