pub struct Sha256Hash;Expand description
A struct that implements libcrux_traits::digest traits.
Sha256Hasher is a convenience hasher for this struct.
Trait Implementations§
Source§impl Clone for Sha256Hash
impl Clone for Sha256Hash
Source§fn clone(&self) -> Sha256Hash
fn clone(&self) -> Sha256Hash
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for Sha256Hash
impl Default for Sha256Hash
Source§fn default() -> Sha256Hash
fn default() -> Sha256Hash
Returns the “default value” for a type. Read more
Source§impl DigestIncremental<32> for Sha256Hash
impl DigestIncremental<32> for Sha256Hash
Source§impl DigestIncremental for Sha256Hash
impl DigestIncremental for Sha256Hash
Source§fn finish(
state: &mut Self::IncrementalState,
digest: &mut [u8],
) -> Result<usize, FinishError>
fn finish( state: &mut Self::IncrementalState, digest: &mut [u8], ) -> Result<usize, FinishError>
Writes the digest into
digest. Read moreSource§impl DigestIncrementalBase for Sha256Hash
impl DigestIncrementalBase for Sha256Hash
Source§fn update(
state: &mut Self::IncrementalState,
payload: &[u8],
) -> Result<(), UpdateError>
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)
fn reset(state: &mut Self::IncrementalState)
Reset the digest state.
Source§type IncrementalState = Sha256
type IncrementalState = Sha256
The digest state.
Source§impl Hash<32> for Sha256Hash
impl Hash<32> for Sha256Hash
Auto Trait Implementations§
impl Freeze for Sha256Hash
impl RefUnwindSafe for Sha256Hash
impl Send for Sha256Hash
impl Sync for Sha256Hash
impl Unpin for Sha256Hash
impl UnwindSafe for Sha256Hash
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<const OUTPUT_LEN: usize, D> DigestIncremental<OUTPUT_LEN> for Dwhere
D: DigestIncremental<OUTPUT_LEN>,
impl<const OUTPUT_LEN: usize, D> DigestIncremental<OUTPUT_LEN> for Dwhere
D: DigestIncremental<OUTPUT_LEN>,
Source§fn finish(
state: &mut <D as DigestIncrementalBase>::IncrementalState,
) -> [u8; OUTPUT_LEN]
fn finish( state: &mut <D as DigestIncrementalBase>::IncrementalState, ) -> [u8; OUTPUT_LEN]
Returns the digest as an array. Read more