Trait DynDigest
trait DynDigest
Modification of the Digest trait suitable for trait objects.
Required Methods
fn update(self: &mut Self, data: &[u8])Digest input data.
This method can be called repeatedly for use with streaming messages.
fn finalize_into(self: Self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>Write result into provided array and consume the hasher instance.
Returns error if buffer length is not equal to
output_size.fn finalize_into_reset(self: &mut Self, out: &mut [u8]) -> Result<(), InvalidBufferSize>Write result into provided array and reset the hasher instance.
Returns error if buffer length is not equal to
output_size.fn reset(self: &mut Self)Reset hasher instance to its initial state.
fn output_size(self: &Self) -> usizeGet output size of the hasher
fn box_clone(self: &Self) -> Box<dyn DynDigest>Clone hasher state into a boxed trait object
Provided Methods
fn finalize_reset(self: &mut Self) -> Box<[u8]>Retrieve result and reset hasher instance
fn finalize(self: Box<Self>) -> Box<[u8]>Retrieve result and consume boxed hasher instance
Implementors
impl<D: Update + FixedOutputReset + Reset + Clone + 'static> DynDigest for Dimpl<D> DynDigest for CoreWrapper<T>