xxHash implements very fast non-cryptographic hash functions for checksums and data structures, with stable XXH32, XXH64, XXH3, and XXH128 variants.
Overview
xxHash is a portable C library that computes non-cryptographic hashes at speeds described as approaching RAM bandwidth limits. It exposes multiple algorithms: XXH32 and XXH64 for 32- and 64-bit outputs, and XXH3 with 64-bit or 128-bit outputs where XXH364bits is the documented default for new work.
The same input is specified to produce the same hash across platforms and releases once an algorithm is finalized. The project warns explicitly that xxHash is not suitable for signatures, password storage, or other security-sensitive uses that need attack resistance. It targets checksums, hash tables, bloom filters, and similar workloads where speed and distribution matter.
The default build produces libxxhash and the xxhsum command-line utility for generating and verifying checksums and running benchmarks. APIs cover one-shot hashing of contiguous memory and incremental streaming over unknown-sized data. Optional compile-time macros control inlining, symbol namespacing, vectorization behavior, and binary size tradeoffs.
Quality materials reference passing Austin Appleby's SMHasher suite and providing collision stress testing. The project lists many language ports and package manager availability, and the website offers a browser-based WebAssembly demo that hashes locally without uploading input.
Key features
- XXH32, XXH64, XXH3, and XXH128 variants
- Single-shot and streaming hash APIs
- xxhsum checksum CLI utility
- Header-only and CMake integration options
- Stable outputs across platforms
- Compile-time performance and size macros
- Documented format specification
- SMHasher quality testing referenced
Use cases
- Fast checksums for files and buffers
- Hash tables and bloom filter keys
- Integrity checks in storage and transfer tools
- Benchmarking hash throughput on hardware
- Cross-language compatible digest generation