Hey folks! I have released a new crate, named uuid-readable-rs.
It's a library that generates unique, easy-to-remember phrases that act like UUIDs. It derives the sentence from a UUID (which is 128 bits) and makes sure there is no entropy loss (read the README).
Example:
use uuid::Uuid;
use uuid_readable_rs::{generate_from, short_from, generate, short, generate_inverse};
// You can define your own UUID and pass it to uuid_readable_rs like so
let uuid = Uuid::new_v4();
let sentence_128: String = generate_from(uuid);
let sentence_32: String = short_from(uuid);
// You can also get an UUID from a sentence that was previously generated
let original_uuid: Uuid = generate_inverse(sentence_128).unwrap();
assert_eq!(uuid, original_uuid);
// Or let uuid_readable_rs handle the Uuid generation
let sentence_128: String = generate();
let sentence_32: String = short();
For the long - aka generate()
- version, a typical sentence generated by this lib looks like:
Wildon Mollie Behka the bubbler of Arecibo moaned Chavey Haney Torbart and 10 calm kingfishers
For the short - aka short()
- version, a typical sentence looks like:
Zink recorded by 127 large armadillos