pub struct Sha1 { /* private fields */ }Expand description
SHA-1.
Collision-broken; provided for legacy protocols (HMAC-SHA-1 remains sound).
Served by the driver registered for it; see driver.
§Example
ⓘ
let digest = Sha1::digest(b"hello world");
// Or incrementally:
let mut hasher = Sha1::new();
hasher.update(b"hello ");
hasher.update(b"world");
assert_eq!(hasher.finalize(), digest);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Sha1
impl !Unpin for Sha1
impl !UnwindSafe for Sha1
impl Freeze for Sha1
impl Send for Sha1
impl Sync for Sha1
impl UnsafeUnpin for Sha1
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