proqnt

Version Documentation Build License Downloads

A pronounceable quintuplet, or proquint, is a pronounceable 5-letter string encoding a unique 16-bit integer.

Proquints may be used to encode binary data such as IP addresses, public keys, and UUIDs in a more human-friendly way. For more information, check out the specification

Basic Usage

```rust

use std::net::Ipv4Addr;

use proqnt::{FromProquints, IntoProquints, Proquint}; asserteq!( format!("{}", Ipv4Addr::new(127, 0, 0, 1).proquintencode()), "lusab-babad" ); assert!( Ipv4Addr::new(127, 0, 0, 1).proquintdigits().eq([ u16::parseproquints("lusab").unwrap(), u16::parseproquints("babad").unwrap() ].intoiter()) ); asserteq!( format!("{}", [127u8, 0, 0, 1].proquintencode()), "lusab-babad" ); assert!( Ipv4Addr::new(127, 0, 0, 1).proquintencode().intoiter().eq([ "lusab".parse::().unwrap(), "babad".parse::().unwrap() ].into_iter()) ); // NOTE: [127, 0, 0, 1] will yield an array of i32, which will give the wrong result! ```