[−][src]Trait digest::DynDigest
This is supported on crate feature
alloc only.The DynDigest trait is a modification of Digest trait suitable
for trait objects.
Required methods
pub fn update(&mut self, data: &[u8])[src]
Digest input data.
This method can be called repeatedly for use with streaming messages.
pub fn finalize_reset(&mut self) -> Box<[u8]>[src]
Retrieve result and reset hasher instance
pub fn finalize(self: Box<Self>) -> Box<[u8]>[src]
Retrieve result and consume boxed hasher instance
pub fn finalize_into(self, buf: &mut [u8]) -> Result<(), InvalidBufferLength>[src]
Write result into provided array and consume the hasher instance.
Returns error if buffer length is not equal to output_size.
pub fn finalize_into_reset(
&mut self,
out: &mut [u8]
) -> Result<(), InvalidBufferLength>[src]
&mut self,
out: &mut [u8]
) -> Result<(), InvalidBufferLength>
Write result into provided array and reset the hasher instance.
Returns error if buffer length is not equal to output_size.
pub fn reset(&mut self)[src]
Reset hasher instance to its initial state.
pub fn output_size(&self) -> usize[src]
Get output size of the hasher
pub fn box_clone(&self) -> Box<dyn DynDigest>[src]
Clone hasher state into a boxed trait object
Implementors
impl<D: Update + FixedOutput + Reset + Clone + 'static> DynDigest for D[src]
pub fn update(&mut self, data: &[u8])[src]
pub fn finalize_reset(&mut self) -> Box<[u8]>[src]
pub fn finalize(self: Box<Self>) -> Box<[u8]>[src]
pub fn finalize_into(self, buf: &mut [u8]) -> Result<(), InvalidBufferLength>[src]
pub fn finalize_into_reset(
&mut self,
buf: &mut [u8]
) -> Result<(), InvalidBufferLength>[src]
&mut self,
buf: &mut [u8]
) -> Result<(), InvalidBufferLength>