pub struct Sha384 { /* private fields */ }Expand description
SHA-384 hash function (FIPS 180-4).
SHA-384 is identical to SHA-512 but with a distinct initialization vector and output truncated to 48 bytes (384 bits).
SHA-384 is provided only for TLS 1.3 support, users should prefer super::Sha512.
§One-shot API
ⓘ
use crypto::{Hasher, sha2::Sha384};
let hash = Sha384::hash(b"hello world");§Incremental API
ⓘ
use crypto::{Hasher, sha2::Sha384};
let mut hasher = Sha384::new();
hasher.update(b"hello ");
hasher.update(b"world");
let hash = hasher.sum();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 UnsafeUnpin 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