| Crates.io | JenkHash |
| lib.rs | JenkHash |
| version | 0.3.0 |
| created_at | 2025-12-19 07:22:39.267951+00 |
| updated_at | 2025-12-23 09:08:01.42039+00 |
| description | Bob Jenkins hash functions for Rust with a digest-compatible API. |
| homepage | |
| repository | https://gitlab.com/DrakeTDL/JenkHash |
| max_upload_size | |
| id | 1994340 |
| size | 87,670 |
A collection of Bob Jenkins hash functions for Rust with a unified API. The crate targets no_std, provides a custom Hasher trait for incremental hashing, and ships reference implementations of several classic non-cryptographic hashes.
OneAtATime — simple, fast 32-bit hash for hash tablesLookup2 — original Jenkins hash (32-bit)Lookup3 — improved Jenkins hash with stronger avalanche (32-bit)Spooky — high-performance hash optimized for 64-bit CPUs (variable output sizes)Add the crate to your Cargo.toml:
[dependencies]
jenkhash = "0.1"
use JenkHash::{Hasher, OneAtATime};
let mut hasher = OneAtATime::new();
hasher.write(b"hello");
hasher.write(b" world");
let hash = hasher.finalize();
assert_eq!(hash, 1045060183);
cargo testcargo clippy --all-targets --all-features