pub struct Sha384 { /* private fields */ }
Expand description
The SHA-384 hash function.
The SHA-512 algorithm with the SHA-384 initialization vector, truncated to 384 bits.
§Examples
const DIGEST: [u8; 48] = Sha384::new()
.update(b"The quick brown fox ")
.update(b"jumps over the lazy dog")
.finalize();
assert_eq!(
hex::encode(&DIGEST[..]),
concat!(
"ca737f1014a48f4c0b6dd43cb177b0afd9e5169367544c49",
"4011e3317dbf9a509cb1e5dc1e85a941bbee3d7f2afbc9b1"
)
);
Implementations§
Source§impl Sha384
impl Sha384
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 = 48usize
pub const DIGEST_SIZE: usize = 48usize
The digest size of the hash function.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sha384
impl RefUnwindSafe for Sha384
impl Send for Sha384
impl Sync for Sha384
impl Unpin for Sha384
impl UnwindSafe for Sha384
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