Skip to main content

Crate humanhash

Crate humanhash 

Source
Expand description

Deterministic, memorable, BIP39-encoded fingerprints of digests.

Same input always produces the same dash-separated word string. This is a lossy fingerprint — it does NOT preserve every input bit, and the original digest is NOT recoverable from the output. The point is a short, memorable label for a hash you can paste into Slack or read aloud on a call.

use humanhash::humanize;
let tag = humanize("550e8400-e29b-41d4-a716-446655440000").unwrap();
assert_eq!(tag.split('-').count(), 4);

Structs§

HumanizeOptions

Enums§

HumanhashError

Constants§

DEFAULT_WORDS
Default word count. 4 words = 44 bits ≈ 17.6 trillion fingerprints — plenty for human-recognition use cases.
MAX_WORDS
Maximum supported word count. Bounded by the 64-bit FNV-1a accumulator (5 * 11 = 55 bits ≤ 64).

Functions§

humanize
Render a memorable fingerprint of input, with default options (4 words, - separator).
humanize_bytes
Render a memorable fingerprint directly from raw bytes.
humanize_bytes_with
Like humanize_bytes but with caller-controlled options.
humanize_with
Like humanize but with caller-controlled options.