Crates.io | aiid |
lib.rs | aiid |
version | 0.0.2 |
source | src |
created_at | 2021-07-02 13:42:00.234334 |
updated_at | 2021-07-02 13:50:03.117386 |
description | AIngle base32 encoding scheme for keys, agents, identifiers, etc |
homepage | |
repository | https://github.com/AIngleLab/ai-id |
max_upload_size | |
id | 417824 |
size | 28,615 |
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);
}