Soenneker.Hashing.XxHash
4.0.91
Prefix Reserved
dotnet add package Soenneker.Hashing.XxHash --version 4.0.91
NuGet\Install-Package Soenneker.Hashing.XxHash -Version 4.0.91
<PackageReference Include="Soenneker.Hashing.XxHash" Version="4.0.91" />
<PackageVersion Include="Soenneker.Hashing.XxHash" Version="4.0.91" />
<PackageReference Include="Soenneker.Hashing.XxHash" />
paket add Soenneker.Hashing.XxHash --version 4.0.91
#r "nuget: Soenneker.Hashing.XxHash, 4.0.91"
#:package Soenneker.Hashing.XxHash@4.0.91
#addin nuget:?package=Soenneker.Hashing.XxHash&version=4.0.91
#tool nuget:?package=Soenneker.Hashing.XxHash&version=4.0.91
Soenneker.Hashing.XxHash
Fast XXH3 64-bit hashing for byte spans and UTF-8 text, with integer and canonical 16-character lowercase hexadecimal outputs.
XXH3 is non-cryptographic. Use it for hash-table keys, cache keys, partition selection, deduplication hints, and accidental-corruption checks. Do not use it for passwords, signatures, authentication tokens, or adversarial integrity checks.
Installation
dotnet add package Soenneker.Hashing.XxHash
Hash UTF-8 text
using Soenneker.Hashing.XxHash;
string hex = XxHash3Util.Hash("customer:42");
// 16 lowercase hex characters
ulong numeric = XxHash3Util.HashToUInt64("customer:42");
String and character-span overloads encode text as UTF-8 before hashing, so the same Unicode text produces the same result across processes.
Hash bytes or use a seed
ReadOnlySpan<byte> payload = ...;
ulong standard = XxHash3Util.HashToUInt64(payload);
ulong partitioned = XxHash3Util.HashUtf8ToUInt64(payload, seed: 17);
A seed produces a different deterministic hash family; it is not a secret key and does not make XXH3 cryptographically secure.
Compare a stored text hash
string expected = XxHash3Util.Hash(value);
bool matches = XxHash3Util.Verify(value, expected);
Verify() accepts exactly 16 hexadecimal characters and returns false for malformed values or a mismatch. This comparison is a convenience check, not constant-time authentication.
Character inputs up to the internal threshold are UTF-8 encoded on the stack; larger inputs use a pooled byte array. Byte-span hashing itself does not allocate. Null string overload arguments throw ArgumentNullException; span overloads naturally support empty input.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Soenneker.Extensions.Spans.Readonly.Chars (>= 4.0.115)
- System.IO.Hashing (>= 10.0.12)
NuGet packages (13)
Showing the top 5 NuGet packages that depend on Soenneker.Hashing.XxHash:
| Package | Downloads |
|---|---|
|
Soenneker.HighLevel.Client
Provides cached HighLevel HTTP clients with optional per-API-key authentication |
|
|
Soenneker.Node.Util
A utility library for Node related operations |
|
|
Soenneker.HubSpot.Client
Provides cached HubSpot HTTP clients authenticated with private app access tokens |
|
|
Soenneker.Zoho.HttpClients
Provides cached HTTP clients for Zoho CRM access tokens and data-center API origins. |
|
|
Soenneker.N8n.HttpClients
Provides cached, authenticated HTTP clients for one or more n8n servers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.91 | 0 | 9/8/2026 |
| 4.0.90 | 295 | 9/7/2026 |
| 4.0.89 | 197 | 9/7/2026 |
| 4.0.88 | 292 | 9/7/2026 |
| 4.0.87 | 965 | 9/5/2026 |
| 4.0.86 | 1,088 | 9/4/2026 |
| 4.0.85 | 2,375 | 8/31/2026 |
| 4.0.84 | 542 | 8/31/2026 |
| 4.0.83 | 436 | 8/31/2026 |
| 4.0.82 | 359 | 8/30/2026 |
| 4.0.81 | 601 | 8/30/2026 |
| 4.0.80 | 1,299 | 8/29/2026 |
| 4.0.79 | 91 | 8/29/2026 |
| 4.0.78 | 3,358 | 8/21/2026 |
| 4.0.77 | 1,924 | 8/18/2026 |
| 4.0.75 | 348 | 8/18/2026 |
| 4.0.74 | 1,258 | 8/12/2026 |
| 4.0.73 | 3,659 | 8/7/2026 |
| 4.0.72 | 1,826 | 7/29/2026 |
| 4.0.71 | 1,239 | 7/29/2026 |
Updated System.IO.Hashing to 10.0.12