This online tool allows you to generate the hash xxh128 of any string.
XXH128 length is 32 characters
Hash available
MD2 Hash, MD4 Hash, MD5 Hash, SHA1 Hash, SHA224 Hash, SHA256 Hash, SHA384 Hash, SHA512/224 Hash, SHA512/256 Hash, SHA512 Hash, SHA3-224 Hash, SHA3-256 Hash, SHA3-384 Hash, SHA3-512 Hash, RIPEMD128 Hash, RIPEMD160 Hash, RIPEMD256 Hash, RIPEMD320 Hash, WHIRLPOOL Hash, TIGER128,3 Hash, TIGER160,3 Hash, TIGER192,3 Hash, TIGER128,4 Hash, TIGER160,4 Hash, TIGER192,4 Hash, SNEFRU Hash, SNEFRU256 Hash, GOST Hash, GOST-CRYPTO Hash, ADLER32 Hash, CRC32 Hash, CRC32B Hash, CRC32C Hash, FNV132 Hash, FNV1A32 Hash, FNV164 Hash, FNV1A64 Hash, JOAAT Hash, MURMUR3A Hash, MURMUR3C Hash, MURMUR3F Hash, XXH32 Hash, XXH64 Hash, XXH3 Hash, XXH128 Hash, HAVAL128,3 Hash, HAVAL160,3 Hash, HAVAL192,3 Hash, HAVAL224,3 Hash, HAVAL256,3 Hash, HAVAL128,4 Hash, HAVAL160,4 Hash, HAVAL192,4 Hash, HAVAL224,4 Hash, HAVAL256,4 Hash, HAVAL128,5 Hash, HAVAL160,5 Hash, HAVAL192,5 Hash, HAVAL224,5 Hash, HAVAL256,5 Hash,
What is XXH128?
XXH128 is the 128-bit variant of the XXH3 algorithm. While XXH3 can provide 64-bit or 128-bit outputs, XXH128 is specifically the implementation that generates the full 128-bit digest. It is designed for applications where the probability of collisions must be mathematically negligible, even when hashing trillions of items. Like XXH3, it is built for modern CPUs, using vectorized instructions to achieve speeds that make it one of the fastest 128-bit hash functions in existence.
How does XXH128 hash works?
XXH128 builds upon the XXH3 core, extending the "avalanche" mixing phase to handle double the state size:
- State Expansion: It utilizes two parallel internal states, each 64 bits wide, which are processed simultaneously using SIMD instructions.
- Wide Mixing: The algorithm processes data in larger chunks compared to XXH64, ensuring that the input is "smeared" across the entire 128-bit state.
- Secret Keying: It incorporates a "secret" (a pseudo-random block of data) during the mixing phase. This makes the hash output dependent not just on the input, but also on the internal constant, which significantly improves distribution quality and resistance to malicious collision attempts.
- Finalization (128-bit Avalanche): The finalization stage performs an intensive bitwise mixing of the two 64-bit accumulators to produce a highly uniform 128-bit fingerprint.
Comparison: XXH128 vs. XXH3 and XXH64
- XXH128 vs. XXH64:
- Collision Resistance: XXH128 is vastly superior. With a 128-bit output, the birthday paradox collision threshold is exponentially higher than that of a 64-bit hash (XXH64). If your application handles massive datasets (e.g., big data indexing), XXH128 is the safer choice.
Performance: XXH128 is only marginally slower than XXH64, despite providing double the bits, thanks to the efficiency of the vectorized (SIMD) implementation.
XXH128 vs. XXH3 (64-bit mode):
- Primary Use: XXH3 (in 64-bit mode) is intended for "speed-at-all-costs" hash tables where collisions are handled by the data structure. XXH128 is intended for "integrity-focused" applications (like file deduplication or verifying large data blocks) where you need a unique, collision-resistant identifier.
- Complexity: XXH128 uses a more complex finalization stage to "compress" the internal states into a final 128-bit digest, whereas XXH3 (64-bit) exits slightly earlier.