pub struct Blake3;Expand description
BLAKE3 hash function (32-byte output by default).
Implementations§
Source§impl Blake3
impl Blake3
Sourcepub const DIGEST_LEN: usize = 32
pub const DIGEST_LEN: usize = 32
Byte length of the BLAKE3 default digest output.
Sourcepub const OUTPUT_LEN: usize = 32
pub const OUTPUT_LEN: usize = 32
Output length in bytes (alias for DIGEST_LEN; use for generic const contexts).
Sourcepub const BLOCK_SIZE: usize = 64
pub const BLOCK_SIZE: usize = 64
BLAKE3 block size in bytes.
Source§impl Blake3
impl Blake3
Sourcepub fn hash_fixed(&self, msg: &[u8]) -> [u8; 32]
pub fn hash_fixed(&self, msg: &[u8]) -> [u8; 32]
Hash msg and return the 32-byte BLAKE3 digest as a fixed-size array.
Alloc-free alternative to Hash::hash_to_vec.
§no_std note
When the no_std feature is enabled, this method (along with
blake3_keyed_hash and blake3_derive_key) is the preferred API
since it avoids heap allocation entirely.
Trait Implementations§
impl Copy for Blake3
Source§impl Hash for Blake3
impl Hash for Blake3
Auto Trait Implementations§
impl Freeze for Blake3
impl RefUnwindSafe for Blake3
impl Send for Blake3
impl Sync for Blake3
impl Unpin for Blake3
impl UnsafeUnpin for Blake3
impl UnwindSafe for Blake3
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