#id #generator #org

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

#2102 in Development tools

Download history 3/week @ 2023-12-22 1/week @ 2023-12-29 1/week @ 2024-01-12 26/week @ 2024-01-19 9/week @ 2024-01-26 153/week @ 2024-02-02 194/week @ 2024-02-09 195/week @ 2024-02-16 249/week @ 2024-02-23 217/week @ 2024-03-01 208/week @ 2024-03-08 105/week @ 2024-03-15 115/week @ 2024-03-22

688 downloads per month

MIT/Apache

21KB
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