Crates.io | hash-ids |
lib.rs | hash-ids |
version | 0.3.1 |
source | src |
created_at | 2020-05-12 21:22:23.915259 |
updated_at | 2024-09-23 12:49:48.408111 |
description | a fast hashids (hashids.org) implementation |
homepage | |
repository | https://github.com/kardeiz/hash-ids |
max_upload_size | |
id | 240832 |
size | 21,472 |
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"));
}