#base32 #erasure #codec #decoding #reed-solomon

aiid

AIngle base32 encoding scheme for keys, agents, identifiers, etc

2 releases

0.0.2 Jul 2, 2021
0.0.1 Jul 2, 2021

#2342 in Encoding


Used in aiid_js

Apache-2.0

26KB
468 lines

ai-id

AIngle base32 encoding scheme for keys, agents, identifiers, etc.

extern crate aiid;

fn main() {
    let enc = aiid::aiidEncoding::with_kind("ais0").unwrap();
    let key = enc.encode(&[0; 32]).unwrap();
    assert_eq!("aiSciacbd", key);
    let buffer = enc.decode(&key).unwrap();
    assert_eq!([0; 32].to_vec(), buffer);
}

lib.rs:

AIngle AI-ID base32 encoding utility.

Example

extern crate aiid;

fn main() {
    let enc = aiid::aiidEncoding::with_kind("ais0").unwrap();
    let key = enc.encode(&[0; 32]).unwrap();
    assert_eq!("aiSciacbd", key);
    let buffer = enc.decode(&key).unwrap();
    assert_eq!([0; 32].to_vec(), buffer);
}

Dependencies

~51KB