Module bao::hash [−][src]
Compute a Bao hash from some input bytes.
Example
let hash_at_once = bao::hash::hash(b"input bytes"); let mut hasher = bao::hash::Writer::new(); hasher.update(b"input"); hasher.update(b" "); hasher.update(b"bytes"); let hash_incremental = hasher.finish(); assert_eq!(hash_at_once, hash_incremental);
Structs
Hash |
A Bao hash, with constant-time equality. |
Writer |
An incremental hasher. This implementation is single-threaded. |
Constants
HASH_SIZE |
The size of a |
Functions
hash |
Hash a slice of input bytes all at once. If the |