Soenneker.Hashing.XxHash
4.0.121
Prefix Reserved
dotnet add package Soenneker.Hashing.XxHash --version 4.0.121
NuGet\Install-Package Soenneker.Hashing.XxHash -Version 4.0.121
<PackageReference Include="Soenneker.Hashing.XxHash" Version="4.0.121" />
<PackageVersion Include="Soenneker.Hashing.XxHash" Version="4.0.121" />
<PackageReference Include="Soenneker.Hashing.XxHash" />
paket add Soenneker.Hashing.XxHash --version 4.0.121
#r "nuget: Soenneker.Hashing.XxHash, 4.0.121"
#:package Soenneker.Hashing.XxHash@4.0.121
#addin nuget:?package=Soenneker.Hashing.XxHash&version=4.0.121
#tool nuget:?package=Soenneker.Hashing.XxHash&version=4.0.121
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.148)
- System.IO.Hashing (>= 10.0.13)
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.121 | 742 | 10/15/2026 |
| 4.0.120 | 51 | 10/15/2026 |
| 4.0.118 | 374 | 10/14/2026 |
| 4.0.115 | 830 | 10/14/2026 |
| 4.0.109 | 727 | 10/12/2026 |
| 4.0.107 | 851 | 10/12/2026 |
| 4.0.106 | 1,098 | 10/11/2026 |
| 4.0.105 | 703 | 10/11/2026 |
| 4.0.104 | 3,064 | 9/30/2026 |
| 4.0.103 | 2,291 | 9/25/2026 |
| 4.0.102 | 127 | 9/25/2026 |
| 4.0.101 | 107 | 9/24/2026 |
| 4.0.100 | 2,561 | 9/16/2026 |
| 4.0.99 | 133 | 9/16/2026 |
| 4.0.98 | 123 | 9/15/2026 |
| 4.0.97 | 1,973 | 9/13/2026 |
| 4.0.96 | 443 | 9/13/2026 |
| 4.0.95 | 498 | 9/13/2026 |
| 4.0.94 | 768 | 9/12/2026 |
| 4.0.93 | 121 | 9/12/2026 |
Updated NuGet packages