|
1 | 1 | using System;
|
2 |
| -#if NET462_OR_GREATER || NETCOREAPP |
3 |
| -using System.IO.Hashing; |
4 |
| -#endif |
5 | 2 | using System.Security.Cryptography;
|
6 | 3 | using SabreTools.Hashing.Checksum;
|
7 | 4 | using SabreTools.Hashing.CryptographicHash;
|
@@ -29,7 +26,7 @@ public class HashWrapper : IDisposable
|
29 | 26 | {
|
30 | 27 | HashAlgorithm ha => ha.Hash,
|
31 | 28 | #if NET462_OR_GREATER || NETCOREAPP
|
32 |
| - NonCryptographicHashAlgorithm ncha => ncha.GetCurrentHash(), |
| 29 | + System.IO.Hashing.NonCryptographicHashAlgorithm ncha => ncha.GetCurrentHash(), |
33 | 30 | #endif
|
34 | 31 | #if NET8_0_OR_GREATER
|
35 | 32 | Shake128 s128 => s128.GetCurrentHash(32),
|
@@ -276,11 +273,11 @@ private void GetHasher()
|
276 | 273 | HashType.Tiger2_192_3 => new Tiger2_192_3(),
|
277 | 274 | HashType.Tiger2_192_4 => new Tiger2_192_4(),
|
278 | 275 |
|
279 |
| - HashType.XxHash32 => new NonCryptographicHash.XxHash32(), |
280 |
| - HashType.XxHash64 => new NonCryptographicHash.XxHash64(), |
| 276 | + HashType.XxHash32 => new XxHash32(), |
| 277 | + HashType.XxHash64 => new XxHash64(), |
281 | 278 | #if NET462_OR_GREATER || NETCOREAPP
|
282 |
| - HashType.XxHash3 => new XxHash3(), |
283 |
| - HashType.XxHash128 => new XxHash128(), |
| 279 | + HashType.XxHash3 => new System.IO.Hashing.XxHash3(), |
| 280 | + HashType.XxHash128 => new System.IO.Hashing.XxHash128(), |
284 | 281 | #endif
|
285 | 282 | _ => null,
|
286 | 283 | };
|
@@ -309,7 +306,7 @@ public void Process(byte[] buffer, int offset, int size)
|
309 | 306 | break;
|
310 | 307 |
|
311 | 308 | #if NET462_OR_GREATER || NETCOREAPP
|
312 |
| - case NonCryptographicHashAlgorithm ncha: |
| 309 | + case System.IO.Hashing.NonCryptographicHashAlgorithm ncha: |
313 | 310 | var nchaBufferSpan = new ReadOnlySpan<byte>(buffer, offset, size);
|
314 | 311 | ncha.Append(nchaBufferSpan);
|
315 | 312 | break;
|
|
0 commit comments