pub struct Sha512 { /* private fields */ }Expand description
SHA-512 hash function (RFC 6234 / FIPS 180-4).
Implements the Hasher trait.
§One-shot API
ⓘ
use crypto::{Hasher, sha2::Sha512};
let hash = Sha512::hash(b"hello world");§Incremental API
ⓘ
use crypto::{Hasher, sha2::Sha512};
let mut hasher = Sha512::new();
hasher.update(b"hello ");
hasher.update(b"world");
let hash = hasher.sum();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 UnsafeUnpin 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