Skip to content

Commit

Permalink
Removed System.IO.Hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
uholeschak committed Dec 20, 2024
1 parent c415add commit a20830c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion Tools/ApkUncompress2/ApkUncompress2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<PackageReference Include="ELFSharp" Version="2.17.3" />
<PackageReference Include="K4os.Compression.LZ4" Version="1.3.8" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="System.IO.Hashing" Version="9.0.0" />
</ItemGroup>

</Project>
12 changes: 0 additions & 12 deletions Tools/ApkUncompress2/Utilities/MonoAndroidHelper.Basic.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO.Hashing;
using System.Text;

using Xamarin.Android.Tools;
Expand Down Expand Up @@ -228,15 +227,4 @@ public static ulong GetMangledAssemblyNameSizeOverhead ()
}

public static byte[] Utf8StringToBytes (string str) => Encoding.UTF8.GetBytes (str);

public static ulong GetXxHash (string str, bool is64Bit) => GetXxHash (Utf8StringToBytes (str), is64Bit);

public static ulong GetXxHash (byte[] stringBytes, bool is64Bit)
{
if (is64Bit) {
return XxHash3.HashToUInt64 (stringBytes);
}

return (ulong)XxHash32.HashToUInt32 (stringBytes);
}
}

0 comments on commit a20830c

Please sign in to comment.