pub struct Sha512 { /* private fields */ }
Expand description
The SHA-512 hash function.
§Examples
const DIGEST: [u8; 64] = Sha512::new()
.update(b"The quick brown fox ")
.update(b"jumps over the lazy dog")
.finalize();
assert_eq!(
hex::encode(&DIGEST[..]),
concat!(
"07e547d9586f6a73f73fbac0435ed76951218fb7d0c8d788a309d785436bbb64",
"2e93a252a954f23912547d1e8a3b5ed6e1bfd7097821233fa0538f3db854fee6"
)
);
Implementations§
Source§impl Sha512
impl Sha512
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 = 64usize
pub const DIGEST_SIZE: usize = 64usize
The digest size of the hash function.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sha512
impl RefUnwindSafe for Sha512
impl Send for Sha512
impl Sync for Sha512
impl Unpin for Sha512
impl UnwindSafe for Sha512
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