ChibiHash-rs
Rust port of N-R-K/ChibiHash. See the article ChibiHash: A small, fast 64-bit hash function for more information.
See the original repository for more information, especially for when not to use ChibiHash.
All credit for the algorithm goes to N-R-K.
Features
- 64-bit hash function
- Deterministic
- Fast
- No dependencies
- Three ways to use ChibiHash:
- Direct Hashing: One-shot hashing using
chibi_hash64() - Simple Hasher: Basic implementation using
ChibiHasher(implementsstd::hash::Hasher) - Streaming Hasher: Memory-efficient streaming with
StreamingChibiHasher(implementsstd::hash::Hasher)
- Direct Hashing: One-shot hashing using
Example
use ;
use Hasher;
Tests
Run cargo test to see the tests.
Benchmarks
Run cargo bench to see the benchmarks. See target/criterion/report/index.html for the HTML report.
License
MIT