Sha224Hash

Struct Sha224Hash 

Source
pub struct Sha224Hash;
Expand description

A struct that implements libcrux_traits::digest traits.

Sha224Hasher is a convenience hasher for this struct.

Trait Implementations§

Source§

impl Clone for Sha224Hash

Source§

fn clone(&self) -> Sha224Hash

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Sha224Hash

Source§

fn default() -> Sha224Hash

Returns the “default value” for a type. Read more
Source§

impl DigestIncremental<28> for Sha224Hash

Source§

fn finish(state: &mut Self::IncrementalState, digest: &mut [u8; 28])

Writes the digest into digest. Read more
Source§

impl DigestIncremental for Sha224Hash

Source§

fn finish( state: &mut Self::IncrementalState, digest: &mut [u8], ) -> Result<usize, FinishError>

Writes the digest into digest. Read more
Source§

impl DigestIncrementalBase for Sha224Hash

Source§

fn update( state: &mut Self::IncrementalState, payload: &[u8], ) -> Result<(), UpdateError>

Add the payload to the digest. Will return an error if payload is longer than u32::MAX to ensure that hacl-rs can process it.

Source§

fn reset(state: &mut Self::IncrementalState)

Reset the digest state.

Source§

type IncrementalState = Sha224

The digest state.
Source§

impl Hash<28> for Sha224Hash

Source§

fn hash(digest: &mut [u8; 28], payload: &[u8]) -> Result<(), HashError>

Return the digest for the given input byte slice, in immediate mode. Will return an error if payload is longer than u32::MAX to ensure that hacl-rs can process it.

Source§

impl Hash for Sha224Hash

Source§

fn hash(digest: &mut [u8], payload: &[u8]) -> Result<usize, HashError>

Writes the digest for the given input byte slice, into digest in immediate mode.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Classify for T

Source§

type Classified = T

Source§

fn classify(self) -> T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Declassify for T

Source§

impl<const OUTPUT_LEN: usize, D> DigestIncremental<OUTPUT_LEN> for D
where D: DigestIncremental<OUTPUT_LEN>,

Source§

fn finish( state: &mut <D as DigestIncrementalBase>::IncrementalState, ) -> [u8; OUTPUT_LEN]

Returns the digest as an array. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<const OUTPUT_LEN: usize, D> Hash<OUTPUT_LEN> for D
where D: Hash<OUTPUT_LEN>,

Source§

fn hash(payload: &[u8]) -> Result<[u8; OUTPUT_LEN], HashError>

Returns the digest for the given input byte slice, as an array, in immediate mode.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.