pub struct SHA2_256_x86 { /* private fields */ }Expand description
An x86 and x86_64 optimized implementation of the SHA2_256 algorithm.
This implementation is only available on x86 and x86_64 targets.
The code will panic if the target is invalid.
§Safety
This implementation does not verify that the target supports the required instructions.
In particular sha,sse4.1 features have to be supported. Otherwise the code will
likely crash at runtime.
Implementations§
Trait Implementations§
Source§impl Default for SHA2_256_x86
impl Default for SHA2_256_x86
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_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_x86
impl HashFunction for SHA2_256_x86
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_x86
impl RefUnwindSafe for SHA2_256_x86
impl Send for SHA2_256_x86
impl Sync for SHA2_256_x86
impl Unpin for SHA2_256_x86
impl UnsafeUnpin for SHA2_256_x86
impl UnwindSafe for SHA2_256_x86
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