pub struct SHA2_256_Portable { /* private fields */ }Expand description
Implementations§
Source§impl SHA2_256_Portable
impl SHA2_256_Portable
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new SHA2_256_Portable instance.
Sourcepub const fn update_const(&mut self, data: &[u8])
pub const fn update_const(&mut self, data: &[u8])
Writes a block of data to the underlying state.
§Panics
This function will panic if the length of the data is greater than u32::MAX,
and when the total processed length exceeds u64::MAX.
Sourcepub const fn write_result_const(&self, output: &mut [u8; 32])
pub const fn write_result_const(&self, output: &mut [u8; 32])
Writes the final has value to the passed output.
§Notes
This function does not update the internal state, and thus
the SHA2_256_Portable can still be used afterwards.
Sourcepub const fn result_const(&self) -> [u8; 32]
pub const fn result_const(&self) -> [u8; 32]
Returns the final hash value.
§Notes
This function does not update the internal state, and thus
the SHA2_256_Portable can still be used afterwards.
Trait Implementations§
Source§impl Default for SHA2_256_Portable
impl Default for SHA2_256_Portable
Source§impl From<SHA2_256_Portable> for SHA2_256_aarch64
impl From<SHA2_256_Portable> for SHA2_256_aarch64
Source§fn from(portable: SHA2_256_Portable) -> Self
fn from(portable: SHA2_256_Portable) -> Self
Converts to this type from the input type.
Source§impl From<SHA2_256_Portable> for SHA2_256_x86
impl From<SHA2_256_Portable> for SHA2_256_x86
Source§fn from(portable: SHA2_256_Portable) -> Self
fn from(portable: SHA2_256_Portable) -> Self
Converts to this type from the input type.
Source§impl From<SHA2_256_aarch64> for SHA2_256_Portable
impl From<SHA2_256_aarch64> for SHA2_256_Portable
Source§fn from(x86: SHA2_256_aarch64) -> Self
fn from(x86: SHA2_256_aarch64) -> Self
Converts to this type from the input type.
Source§impl From<SHA2_256_x86> for SHA2_256_Portable
impl From<SHA2_256_x86> for SHA2_256_Portable
Source§fn from(x86: SHA2_256_x86) -> Self
fn from(x86: SHA2_256_x86) -> Self
Converts to this type from the input type.
Source§impl HashFunction for SHA2_256_Portable
impl HashFunction for SHA2_256_Portable
type Output = [u8; 32]
Source§fn update(&mut self, data: impl AsRef<[u8]>)
fn update(&mut self, data: impl AsRef<[u8]>)
Updates the internal state of the
HashFunction with given data.Source§fn write_result(&self, output: &mut Self::Output)
fn write_result(&self, output: &mut Self::Output)
Writes the final result to the output passed as ref parameter.
Source§fn result(&self) -> Self::Output
fn result(&self) -> Self::Output
A wrapper around
HashFunction::write_result that returns the hash
instead of writing it to output parameter.Auto Trait Implementations§
impl Freeze for SHA2_256_Portable
impl RefUnwindSafe for SHA2_256_Portable
impl Send for SHA2_256_Portable
impl Sync for SHA2_256_Portable
impl Unpin for SHA2_256_Portable
impl UnsafeUnpin for SHA2_256_Portable
impl UnwindSafe for SHA2_256_Portable
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