Crate bao[][src]

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

Decode the Bao format, or decode a slice.

encode

Encode some input bytes into the Bao format, or slice an existing encoding.

hash

Compute a Bao hash from some input bytes.