hash-ids

Crates.iohash-ids
lib.rshash-ids
version0.3.1
sourcesrc
created_at2020-05-12 21:22:23.915259
updated_at2024-09-23 12:49:48.408111
descriptiona fast hashids (hashids.org) implementation
homepage
repositoryhttps://github.com/kardeiz/hash-ids
max_upload_size
id240832
size21,472
Jacob Brown (kardeiz)

documentation

https://docs.rs/hash-ids

README

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"));
}
Commit count: 8

cargo fmt