Skip to content

Commit 89dbe04

Browse files
committed
Simplify apparent usings in wrapper class
1 parent 365ee90 commit 89dbe04

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

SabreTools.Hashing/HashWrapper.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
using System;
2-
#if NET462_OR_GREATER || NETCOREAPP
3-
using System.IO.Hashing;
4-
#endif
52
using System.Security.Cryptography;
63
using SabreTools.Hashing.Checksum;
74
using SabreTools.Hashing.CryptographicHash;
@@ -29,7 +26,7 @@ public class HashWrapper : IDisposable
2926
{
3027
HashAlgorithm ha => ha.Hash,
3128
#if NET462_OR_GREATER || NETCOREAPP
32-
NonCryptographicHashAlgorithm ncha => ncha.GetCurrentHash(),
29+
System.IO.Hashing.NonCryptographicHashAlgorithm ncha => ncha.GetCurrentHash(),
3330
#endif
3431
#if NET8_0_OR_GREATER
3532
Shake128 s128 => s128.GetCurrentHash(32),
@@ -276,11 +273,11 @@ private void GetHasher()
276273
HashType.Tiger2_192_3 => new Tiger2_192_3(),
277274
HashType.Tiger2_192_4 => new Tiger2_192_4(),
278275

279-
HashType.XxHash32 => new NonCryptographicHash.XxHash32(),
280-
HashType.XxHash64 => new NonCryptographicHash.XxHash64(),
276+
HashType.XxHash32 => new XxHash32(),
277+
HashType.XxHash64 => new XxHash64(),
281278
#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(),
284281
#endif
285282
_ => null,
286283
};
@@ -309,7 +306,7 @@ public void Process(byte[] buffer, int offset, int size)
309306
break;
310307

311308
#if NET462_OR_GREATER || NETCOREAPP
312-
case NonCryptographicHashAlgorithm ncha:
309+
case System.IO.Hashing.NonCryptographicHashAlgorithm ncha:
313310
var nchaBufferSpan = new ReadOnlySpan<byte>(buffer, offset, size);
314311
ncha.Append(nchaBufferSpan);
315312
break;

0 commit comments

Comments
 (0)