pub struct Algorithm { /* private fields */ }
Expand description
A digest algorithm.
Implementations§
source§impl Algorithm
impl Algorithm
sourcepub fn chaining_len(&self) -> usize
pub fn chaining_len(&self) -> usize
The size of the chaining value of the digest function, in bytes.
For non-truncated algorithms (SHA-1, SHA-256, SHA-512), this is equal
to Self::output_len()
. For truncated algorithms (e.g. SHA-384,
SHA-512/256), this is equal to the length before truncation. This is
mostly helpful for determining the size of an HMAC key that is
appropriate for the digest algorithm.
sourcepub fn output_len(&self) -> usize
pub fn output_len(&self) -> usize
The length of a finalized digest.