Crate bao

source ·
Expand description

RepoCrateSpec

This crate implements the Bao hash function and encoding format. The bao command line utility is built on top of it. For more about how Bao works and what the encoding format is doing, see the command line readme and the full specification.

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);

Modules

Decode the Bao format, or decode a slice.
Encode some input bytes into the Bao format, or slice an existing encoding.
Compute a Bao hash from some input bytes.