| Crates.io | uniaz |
| lib.rs | uniaz |
| version | 0.1.2 |
| created_at | 2025-12-09 08:19:54.830439+00 |
| updated_at | 2025-12-09 13:03:06.720218+00 |
| description | Unify the Unicode chars into A-Z sequence |
| homepage | https://github.com/Volyyig/uniaz |
| repository | https://github.com/Volyyig/uniaz |
| max_upload_size | |
| id | 1975026 |
| size | 18,039 |
UniAz is a small Rust crate that provides a simple, Unicode-aware way to encode a single Unicode character into the alphabet and recover it back. It combines a base converter and a light-weight cipher permutation to produce obfuscated string representations of characters. It is intended to provide a readable, mappable, and easy-to-remember alternative representation for non‑ASCII characters in situations where they might otherwise become garbled.
Key features
UniAz.Installation
cargo add uniaz
Quick example
use uniaz::UniAz;
fn main() {
let uni = UniAz::new(); // "abcdefghijklmnopqrstuvwxyz"
let encrypted = uni.encrypt(&'你'); // -> "abpx"
let decrypted = uni.decrypt(&encrypted); // -> '你'
println!("encrypted={}", encrypted);
assert_eq!(decrypted, '你');
}
API (important)
UniAz::new() — create an instance.UniAz::encrypt(&char) -> String — convert a char to an encrypted string.UniAz::decrypt(&str) -> char — recover the original char from an encrypted string.Docs & tests
cargo doc --open
License
Enjoy! 🚀