Skip to main content

Module convenience

Module convenience 

Source
Expand description

The convenience API: one call per hash, every feature of BLAKE3 (the plain hash, the keyed hash, key derivation, extended output), any slice, the result returned, and a Hasher for a message fed in pieces, on the calling thread. It does without what makes hashing fast: other cores, batches, streams. Those are the throughput calls, for power users.

Structs§

Hasher
A message’s hash, fed in pieces: update with each piece, in order, then finalize. The pieces may be of any lengths; the hash is the same as hash of them all at once. Every call runs on the calling thread and returns with its input incorporated. For other cores, the crate blake3-servil has throughput::update_multithreaded; for many messages at once, throughput::update_each.

Functions§

hash
The hash of input, on the calling thread.
hash_with
hash in any Mode: the plain hash, the keyed hash, or key derivation.
hash_xof
The extended output of input in mode: an OutputReader that gives as many bytes as the program reads (the first 32 are hash_with’s).