Easy to remember unique sentences acting as UUID
[](LICENSE) [](https://docs.rs/uuid-readable-rs)
Generate easy to remember sentences that acts as human readable UUIDs.
short()
or generate()
respectively)This project does not mean to be crypto safe ! Don't use this as a secure random generator.
Even if we derive sentences from UUID (that are crypto safe), there can still be some collision with 2 differents UUID but resulting in the same sentence.
25^12
possible combinations for generate()
(uses 128-bit Token)25^5
possible combinations for short()
(uses 32-bit Token)Note that the sentence generated by generate()
and the original UUID form a bijection, hence no loss of entropy.
```rust use uuid::Uuid; use uuidreadablers::{generatefrom, shortfrom, generate, short, generate_inverse};
// You can define your own UUID and pass it to uuidreadablers like so let uuid = Uuid::newv4(); let sentence128: String = generatefrom(uuid); let sentence32: String = short_from(uuid);
// You can also get an UUID from a sentence that was previously generated let originaluuid: Uuid = generateinverse(sentence128).unwrap(); asserteq!(uuid, original_uuid);
// Or let uuidreadablers handle the Uuid generation let sentence128: String = generate(); let sentence32: String = short(); ```