Expand description
Human-friendly visual fingerprints for keys, checksums, and any byte string you need a human to compare out-of-band.
Two complementary renderings, both pure functions of the input bytes:
emojihash/emojihash_labels— a BLAKE3-XOF digest sliced into 6-bit symbols indexing a fixed, nameable 64-emoji alphabet. Short, glanceable, and speakable (“monkey pig apple …”).randomart— the OpenSSH-style “Drunken Bishop” ASCII-art grid you see inssh-keygen -lvoutput.
use visual_hashing::{emojihash, emojihash_labels, randomart};
let key = b"\x00\x01\x02\x03";
println!("{}", emojihash(key, 11)); // 🐵 🐶 … (11 emoji)
println!("{}", emojihash_labels(key, 11)); // monkey dog …
println!("{}", randomart(key, "ED25519")); // +--[ED25519 …Both renderings are byte-for-byte deterministic and gated by a frozen conformance corpus, so independent implementations agree exactly.
Constants§
- ALPHABET_
SIZE - The number of distinct emoji digits (a 6-bit alphabet).
- EMOJI
- The 64-entry emoji alphabet (a 6-bit digit set).
- LABELS
- The stable label for each entry in
EMOJI, by index.
Functions§
- emoji_
indices - Return
length6-bit digest symbols (each in0..64). - emojihash
- Map
datato a space-joined string oflengthemoji digits. - emojihash_
labels - The stable label names for
emojihashoutput (space-joined). - randomart
- Render an OpenSSH-style randomart fingerprint of
data.