Soenneker.Hashing.XxHash
4.0.100
Prefix Reserved
dotnet add package Soenneker.Hashing.XxHash --version 4.0.100
NuGet\Install-Package Soenneker.Hashing.XxHash -Version 4.0.100
<PackageReference Include="Soenneker.Hashing.XxHash" Version="4.0.100" />
<PackageVersion Include="Soenneker.Hashing.XxHash" Version="4.0.100" />
<PackageReference Include="Soenneker.Hashing.XxHash" />
paket add Soenneker.Hashing.XxHash --version 4.0.100
#r "nuget: Soenneker.Hashing.XxHash, 4.0.100"
#:package Soenneker.Hashing.XxHash@4.0.100
#addin nuget:?package=Soenneker.Hashing.XxHash&version=4.0.100
#tool nuget:?package=Soenneker.Hashing.XxHash&version=4.0.100
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.124)
- 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.100 | 1,386 | 9/16/2026 |
| 4.0.99 | 82 | 9/16/2026 |
| 4.0.98 | 78 | 9/15/2026 |
| 4.0.97 | 1,932 | 9/13/2026 |
| 4.0.96 | 428 | 9/13/2026 |
| 4.0.95 | 477 | 9/13/2026 |
| 4.0.94 | 754 | 9/12/2026 |
| 4.0.93 | 104 | 9/12/2026 |
| 4.0.92 | 1,675 | 9/9/2026 |
| 4.0.91 | 807 | 9/8/2026 |
| 4.0.90 | 980 | 9/7/2026 |
| 4.0.89 | 456 | 9/7/2026 |
| 4.0.88 | 628 | 9/7/2026 |
| 4.0.87 | 1,408 | 9/5/2026 |
| 4.0.86 | 1,426 | 9/4/2026 |
| 4.0.85 | 2,811 | 8/31/2026 |
| 4.0.84 | 552 | 8/31/2026 |
| 4.0.83 | 447 | 8/31/2026 |
| 4.0.82 | 371 | 8/30/2026 |
| 4.0.81 | 607 | 8/30/2026 |
Updated NuGet packages