#hashids #id #generator

hash-ids

a fast hashids (hashids.org) implementation

3 unstable releases

0.2.1 May 14, 2020
0.2.0 May 14, 2020
0.1.0 May 12, 2020

#12 in #id-generator

Download history 5/week @ 2022-12-05 8/week @ 2022-12-12 8/week @ 2022-12-19 4/week @ 2022-12-26 2/week @ 2023-01-02 3/week @ 2023-01-09 7/week @ 2023-01-16 16/week @ 2023-01-23 18/week @ 2023-01-30 6/week @ 2023-02-06 16/week @ 2023-02-13 13/week @ 2023-02-20 72/week @ 2023-02-27 88/week @ 2023-03-06 37/week @ 2023-03-13 19/week @ 2023-03-20

217 downloads per month

MIT/Apache

20KB
395 lines

hash-ids

A fast, dependency-free implementation for hashids.

Usage

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"));
}

lib.rs:

hash-ids

A fast, dependency-free implementation for hashids.

Usage

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"));
}

No runtime deps