## JenkHash
A collection of Bob Jenkins hash functions for Rust with a unified API. The crate targets `no_std`, follows the `digest` traits, and ships reference implementations of several classic non-cryptographic hashes.
### Available Hash Functions
- `OneAtATime` — simple, fast 32-bit hash for hash tables
- `Lookup2` — 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)
### Installation
Add the crate to your `Cargo.toml`:
```toml
[dependencies]
jenkhash = "0.1"
digest = "0.10"
```
### Usage
```rust
use jenkhash::OneAtATime;
use digest::{Update, FixedOutput};
let mut hasher = OneAtATime::new();
hasher.update(b"hello");
hasher.update(b" world");
let result = hasher.finalize_fixed();
assert_eq!(result[..], 1045060183_i32.to_le_bytes());
```
### Notes
- Use these hashes for non-cryptographic purposes (e.g., hash tables, sharding, deduplication).
- Keep input sizes reasonable; these algorithms are not designed as secure cryptographic hashes.
[//]: # (- Prefer `Spooky` for speed on 64-bit platforms; use `OneAtATime` or `Lookup3` when a 32-bit output is sufficient.)
### Development
- Tests: `cargo test`
- Lint (Clippy): `cargo clippy --all-targets --all-features`