Trait sha2::Digest
[−]
pub trait Digest { type OutputSize: ArrayLength<u8>; type BlockSize: ArrayLength<u8>; fn input(&mut self, input: &[u8]); fn result(self) -> GenericArray<u8, Self::OutputSize>; fn block_bytes(&self) -> usize { ... } fn block_bits(&self) -> usize { ... } fn output_bytes(&self) -> usize { ... } fn output_bits(&self) -> usize { ... } }
The Digest trait specifies an interface common to digest functions
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.
Provided Methods
fn block_bytes(&self) -> usize
Get the block size in bytes.
fn block_bits(&self) -> usize
Get the block size in bits.
fn output_bytes(&self) -> usize
Get the output size in bytes.
fn output_bits(&self) -> usize
Get the output size in bits.
Implementors
impl Digest for Sha256
impl Digest for Sha224
impl Digest for Sha512
impl Digest for Sha384
impl Digest for Sha512Trunc256
impl Digest for Sha512Trunc224