pub struct State {
pub a: u32,
pub b: u32,
pub c: u32,
pub d: u32,
pub e: u32,
pub f: u32,
pub g: u32,
pub h: u32,
}Expand description
SHA-256 internal state
Represents the eight 32-bit values that make up the internal state of the SHA-256 hash function during computation.
Fields§
§a: u32§b: u32§c: u32§d: u32§e: u32§f: u32§g: u32§h: u32Implementations§
Source§impl State
impl State
Sourcepub fn finalize(&self) -> [u8; 32]
pub fn finalize(&self) -> [u8; 32]
Converts the state into its final 32-byte hash representation
§Returns
A 32-byte array containing the final hash value
Sourcepub fn finalize_u32(&self) -> [u32; 8]
pub fn finalize_u32(&self) -> [u32; 8]
Converts the state into an array of eight 32-bit values
§Returns
An array containing the eight state values
Sourcepub fn from_bytes(bytes: &[u8]) -> Self
pub fn from_bytes(bytes: &[u8]) -> Self
Trait Implementations§
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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