[−][src]Struct sha2_const::Sha512_224
The SHA-512/224 hash function.
The SHA-512 algorithm with the SHA-512/224 initialization vector, truncated to 224 bits.
Examples
const DIGEST: [u8; 28] = Sha512_224::new() .update(b"The quick brown fox ") .update(b"jumps over the lazy dog") .finalize(); assert_eq!( hex::encode(&DIGEST[..]), "944cd2847fb54558d4775db0485a50003111c8e5daa63fe722c6aa37" );
Methods
impl Sha512_224[src]
pub const BLOCK_SIZE: usize[src]
The internal block size of the hash function.
pub const DIGEST_SIZE: usize[src]
The digest size of the hash function.
pub const fn new() -> Self[src]
Construct a new instance.
#[must_use]pub const fn update(self, input: &[u8]) -> Self[src]
Add input data to the hash context.
#[must_use]pub const fn finalize(self) -> [u8; 28][src]
Finalize the context and compute the digest.
Trait Implementations
impl Clone for Sha512_224[src]
fn clone(&self) -> Sha512_224[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,