| Crates.io | human-friendly-ids |
| lib.rs | human-friendly-ids |
| version | 0.2.0 |
| created_at | 2025-03-06 17:40:47.376096+00 |
| updated_at | 2025-03-11 23:56:51.570851+00 |
| description | Generate non-visually ambiguous IDs |
| homepage | |
| repository | https://github.com/JosiahBull/human-friendly-ids-rs |
| max_upload_size | |
| id | 1581539 |
| size | 76,450 |
This Rust library is used for generating random human-friendly ids with a base-23 character set. The ids are generated using a cryptographically secure random number generator.
The primary reason you would use this library is to generate visually unambiguous ids that are easy
to read, write, and speak over the phone. The library automatically corrects for common visual
confusions such as 1 vs l, 0 vs O, and 5 vs S, rn vs m, etc.
There is some excellent prior art in this space such as:
Note that this library makes no attempt to avoid creating offensive or inappropriate ids. If you need to avoid generating such ids, you should filter them out after generating them.
[dependencies]
human_friendly_ids = "0.2.0"
use human_friendly_ids::Id;
let id = Id::new(12);
println!("Generated ID: {}", id);
If you would like to contribute to this project, please open an issue or a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Please observe the Unicode-3.0 license for the relevant code included in this library.