pub struct Digest { /* private fields */ }Expand description
A digest algorithm, bound at creation.
compute is one-shot and stateless per call (the resource is
reusable), mirroring crypto.subtle.digest. The byte stream is
the only ingestion path; the result is chunking-invariant. The
streaming contract in README.md applies.
Security:
- A digest authenticates nothing by itself. There is deliberately
no
verifyhere: checking untrusted data against a known digest is an integrity comparison, done by the caller with a constant-time byte comparison (seeREADME.md, “Terminology”) ofcompute’s result. When authenticity is needed, use amac-key.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Digest
impl RefUnwindSafe for Digest
impl Send for Digest
impl Sync for Digest
impl Unpin for Digest
impl UnsafeUnpin for Digest
impl UnwindSafe for Digest
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