mirror of
https://github.com/SabreTools/SabreTools.Hashing.git
synced 2026-07-08 18:06:40 +00:00
Use internal implementation for XXH64
This commit is contained in:
@@ -6,7 +6,7 @@ This library comprises of methods and helpers to simplify the process of getting
|
||||
| --- | --- | --- |
|
||||
| [Aaru.Checksums](https://github.com/aaru-dps/Aaru.Checksums) | Adler-32, Fletcher-16, Fletcher-32, SpamSum | Some code tweaks made to support older .NET versions |
|
||||
| [Blake3.NET](https://github.com/xoofx/Blake3.NET) | BLAKE3 | Used in `net7.0` and above |
|
||||
| [System.IO.Hashing](https://www.nuget.org/packages/System.IO.Hashing) | xxHash64, XXH3, XXH128 | Used in `net462` and above |
|
||||
| [System.IO.Hashing](https://www.nuget.org/packages/System.IO.Hashing) | XXH3, XXH128 | Used in `net462` and above |
|
||||
| [System.Security.Cryptography](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography) | MD5, RIPEMD160 (.NET Framework only), SHA-1, SHA-256, SHA-384, SHA-512, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256 | Built-in library; SHA3-256, SHA3-384, SHA3-512, SHAKE128, and SHAKE256 are `net8.0` and above only for [supported platforms](https://learn.microsoft.com/en-us/dotnet/standard/security/cross-platform-cryptography) |
|
||||
|
||||
Find the link to the Nuget package [here](https://www.nuget.org/packages/SabreTools.Hashing).
|
||||
|
||||
@@ -185,8 +185,8 @@ namespace SabreTools.Hashing.Test
|
||||
{HashType.SpamSum, "3:hMCPQCE6AFQxWyENFACBE+rW6Tj7SMQmKozr9MVERkL:hZRdxZENFs+rPSromekL"},
|
||||
|
||||
{HashType.XxHash32, "aa1d338e"},
|
||||
#if NET462_OR_GREATER || NETCOREAPP
|
||||
{HashType.XxHash64, "181e9ea4f0f62b08"},
|
||||
#if NET462_OR_GREATER || NETCOREAPP
|
||||
{HashType.XxHash3, "f29fda0eeb740404"},
|
||||
{HashType.XxHash128, "e811cdfb1280efae1be1e1a5b4b434d9"},
|
||||
#endif
|
||||
|
||||
@@ -790,12 +790,12 @@ namespace SabreTools.Hashing
|
||||
/// </summary>
|
||||
XxHash32,
|
||||
|
||||
#if NET462_OR_GREATER || NETCOREAPP
|
||||
/// <summary>
|
||||
/// xxHash64 hash
|
||||
/// </summary>
|
||||
XxHash64,
|
||||
|
||||
#if NET462_OR_GREATER || NETCOREAPP
|
||||
/// <summary>
|
||||
/// XXH3 64-bit hash
|
||||
/// </summary>
|
||||
|
||||
@@ -45,8 +45,6 @@ namespace SabreTools.Hashing
|
||||
return ic.Final();
|
||||
|
||||
#if NET462_OR_GREATER || NETCOREAPP
|
||||
case XxHash64 xxh64:
|
||||
return xxh64.GetCurrentHash();
|
||||
case XxHash3 xxh3:
|
||||
return xxh3.GetCurrentHash();
|
||||
case XxHash128 xxh128:
|
||||
@@ -303,8 +301,8 @@ namespace SabreTools.Hashing
|
||||
HashType.SpamSum => new SpamSumContext(),
|
||||
|
||||
HashType.XxHash32 => new XxHash.XxHash32(),
|
||||
HashType.XxHash64 => new XxHash.XxHash64(),
|
||||
#if NET462_OR_GREATER || NETCOREAPP
|
||||
HashType.XxHash64 => new XxHash64(),
|
||||
HashType.XxHash3 => new XxHash3(),
|
||||
HashType.XxHash128 => new XxHash128(),
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user