pub struct Sha256 { /* private fields */ }Expand description
SHA-256 hash function (RFC 6234 / FIPS 180-4).
Implements the Hasher trait.
§One-shot API
ⓘ
use crypto::{Hasher, sha2::Sha256};
let hash = Sha256::hash(b"hello world");§Incremental API
ⓘ
use crypto::{Hasher, sha2::Sha256};
let mut hasher = Sha256::new();
hasher.update(b"hello ");
hasher.update(b"world");
let hash = hasher.sum();Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sha256
impl RefUnwindSafe for Sha256
impl Send for Sha256
impl Sync for Sha256
impl Unpin for Sha256
impl UnsafeUnpin for Sha256
impl UnwindSafe for Sha256
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