#id #generator #org

hash-ids

一个快速的hashids (hashids.org) 实现

3个不稳定版本

0.2.1 2020年5月14日
0.2.0 2020年5月14日
0.1.0 2020年5月12日

1139开发工具

Download history · Rust 包仓库 143/week @ 2024-03-13 · Rust 包仓库 118/week @ 2024-03-20 · Rust 包仓库 136/week @ 2024-03-27 · Rust 包仓库 170/week @ 2024-04-03 · Rust 包仓库 176/week @ 2024-04-10 · Rust 包仓库 191/week @ 2024-04-17 · Rust 包仓库 204/week @ 2024-04-24 · Rust 包仓库 218/week @ 2024-05-01 · Rust 包仓库 233/week @ 2024-05-08 · Rust 包仓库 388/week @ 2024-05-15 · Rust 包仓库 220/week @ 2024-05-22 · Rust 包仓库 232/week @ 2024-05-29 · Rust 包仓库 188/week @ 2024-06-05 · Rust 包仓库 165/week @ 2024-06-12 · Rust 包仓库 246/week @ 2024-06-19 · Rust 包仓库 271/week @ 2024-06-26 · Rust 包仓库

每月下载 904

MIT/Apache

21KB
395

hash-ids

一个快速、无依赖的 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"));
}

lib.rs:

hash-ids

一个快速、无依赖的 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"));
}

无运行时依赖