pub struct Blake3Hasher(/* private fields */);Available on crate feature
blake3 only.Expand description
BLAKE3 Hasher.
Faster than SHA-256 on most modern hardware and produces a 32-byte
output that drops in wherever crate::Sha256Hasher would. Useful
when throughput matters more than the FIPS pedigree of SHA-256.
§Example
use audit_trail::{Blake3Hasher, Digest, Hasher};
let mut hasher = Blake3Hasher::new();
hasher.update(b"audit-trail");
let mut out = Digest::ZERO;
hasher.finalize(&mut out);
assert_ne!(out, Digest::ZERO);Implementations§
Source§impl Blake3Hasher
impl Blake3Hasher
Sourcepub fn new() -> Self
Available on crate features sha2 or blake3 only.
pub fn new() -> Self
sha2 or blake3 only.Construct a fresh Blake3Hasher.
Trait Implementations§
Source§impl Clone for Blake3Hasher
Available on crate features sha2 or blake3 only.
impl Clone for Blake3Hasher
Available on crate features
sha2 or blake3 only.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
Available on crate features sha2 or blake3 only.
impl Debug for Blake3Hasher
Available on crate features
sha2 or blake3 only.Source§impl Default for Blake3Hasher
Available on crate features sha2 or blake3 only.
impl Default for Blake3Hasher
Available on crate features
sha2 or blake3 only.Source§fn default() -> Blake3Hasher
fn default() -> Blake3Hasher
Returns the “default value” for a type. Read more
Source§impl Hasher for Blake3Hasher
Available on crate features sha2 or blake3 only.
impl Hasher for Blake3Hasher
Available on crate features
sha2 or blake3 only.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