Crates.io | hash-ids |
lib.rs | hash-ids |
version | 0.2.1 |
source | src |
created_at | 2020-05-12 21:22:23.915259 |
updated_at | 2020-05-14 20:51:20.874117 |
description | a fast hashids (hashids.org) implementation |
homepage | |
repository | https://github.com/kardeiz/hash-ids |
max_upload_size | |
id | 240832 |
size | 20,098 |
A fast, dependency-free implementation for hashids.
fn main() {
let hash_ids = hash_ids::HashIds::builder()
.with_salt("Arbitrary string")
.finish();
assert_eq!("neHrCa", hash_ids.encode(&[1, 2, 3]));
assert_eq!(vec![1, 2, 3], hash_ids.decode("neHrCa"));
}