pub struct Blake3Hasher { /* private fields */ }Available on (crate features
hash-blake3 or hash-sha2) and crate feature hash-blake3 only.Expand description
Streaming BLAKE3 hasher for inputs that don’t fit in memory or arrive in chunks.
Construct with Blake3Hasher::new, feed data with
update, and finalise with finalize
(returns the default 32-byte digest) or
finalize_xof (returns an arbitrary-length
digest).
update can be called any number of times; the hasher is consumed by
finalisation.
§Example
use crypt_io::hash::Blake3Hasher;
let mut h = Blake3Hasher::new();
h.update(b"first ");
h.update(b"second");
let d = h.finalize();
assert_eq!(d.len(), 32);Implementations§
Trait Implementations§
Source§impl Clone for Blake3Hasher
impl Clone for Blake3Hasher
Source§fn clone(&self) -> Blake3Hasher
fn clone(&self) -> Blake3Hasher
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Blake3Hasher
impl Debug for Blake3Hasher
Source§impl Default for Blake3Hasher
impl Default for Blake3Hasher
Source§fn default() -> Blake3Hasher
fn default() -> Blake3Hasher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Blake3Hasher
impl RefUnwindSafe for Blake3Hasher
impl Send for Blake3Hasher
impl Sync for Blake3Hasher
impl Unpin for Blake3Hasher
impl UnsafeUnpin for Blake3Hasher
impl UnwindSafe for Blake3Hasher
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