Skip to main content

Module blake3

Module blake3 

Source
Expand description

BLAKE3 implementation of the Hasher trait.

This implementation uses the blake3 crate to generate BLAKE3 digests.

§Example

use commonware_cryptography::{Hasher, blake3::Blake3};

// Hash data in a single shot
let digest = Blake3::hash(&[b"hello,", b"world!"]);
println!("digest: {:?}", digest);

// Or stream data incrementally
let mut hasher = Blake3::default();
hasher.update(b"hello,");
hasher.update(b"world!");
let (_hasher, digest) = hasher.finalize();
println!("digest: {:?}", digest);

Structs§

Blake3
BLAKE3 hasher.
Digest
Digest of a BLAKE3 hashing operation.

Type Aliases§

CoreBlake3
Re-export blake3::Hasher as CoreBlake3 for external use if needed.