pub struct Sha512_256 { /* private fields */ }Expand description
The SHA-512/256 hash function.
The SHA-512 algorithm with the SHA-512/256 initialization vector, truncated to 256 bits.
§Examples
const DIGEST: [u8; 32] = Sha512_256::new()
.update(b"The quick brown fox ")
.update(b"jumps over the lazy dog")
.finalize();
assert_eq!(
hex::encode(&DIGEST[..]),
"dd9d67b371519c339ed8dbd25af90e976a1eeefd4ad3d889005e532fc5bef04d"
);Implementations§
Source§impl Sha512_256
impl Sha512_256
Sourcepub const BLOCK_SIZE: usize = 128usize
pub const BLOCK_SIZE: usize = 128usize
The internal block size of the hash function.
Sourcepub const DIGEST_SIZE: usize = 32usize
pub const DIGEST_SIZE: usize = 32usize
The digest size of the hash function.
Trait Implementations§
Source§impl Clone for Sha512_256
impl Clone for Sha512_256
Source§fn clone(&self) -> Sha512_256
fn clone(&self) -> Sha512_256
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 moreAuto Trait Implementations§
impl Freeze for Sha512_256
impl RefUnwindSafe for Sha512_256
impl Send for Sha512_256
impl Sync for Sha512_256
impl Unpin for Sha512_256
impl UnwindSafe for Sha512_256
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