Module hash

Module hash 

Source
Expand description

Fast hashing using BLAKE3.

This module provides:

  • Simple one-shot hashing
  • Incremental hashing for large files
  • Keyed hashing for MACs
  • Parallel chunk hashing

Structs§

ChunkHashResult
Result of chunk hashing.
ChunkHasher
Hash multiple chunks and return individual hashes plus root hash.
HashResult
Result of hashing with metadata.
IncrementalHasher
Incremental hasher for streaming large data.

Constants§

HASH_BUFFER_SIZE
Default buffer size for incremental hashing (64 KB).

Functions§

hash
Compute BLAKE3 hash of data.
hash_chunked
Hash content in chunks from a reader.
hash_multi
Compute BLAKE3 hash of multiple data chunks.
hash_reader
Hash a reader (file, network stream, etc.) incrementally.
keyed_hash
Compute keyed BLAKE3 hash (for MAC).
verify_hash
Verify that data matches the expected hash.

Type Aliases§

Hash
Hash output (256 bits).