Trait sha2::Digest
[−]
[src]
pub trait Digest: Input + FixedOutput { type OutputSize: ArrayLength<u8>; type BlockSize: ArrayLength<u8>; fn input(&mut self, input: &[u8]); fn result(self) -> GenericArray<u8, Self::OutputSize>; }
The Digest trait specifies an interface common to digest functions. It's a
convinience wrapper around Input
and FixedResult
traits
Associated Types
type OutputSize: ArrayLength<u8>
type BlockSize: ArrayLength<u8>
Required Methods
fn input(&mut self, input: &[u8])
Digest input data. This method can be called repeatedly for use with streaming messages.
fn result(self) -> GenericArray<u8, Self::OutputSize>
Retrieve the digest result. This method consumes digest instance.
Implementors
impl<T> Digest for T where
T: Input + FixedOutput,