Core/Accounts: Should fix random error about verifier length.

This commit is contained in:
hondacrx
2021-01-14 10:27:51 -05:00
parent 970876df40
commit 751874784e
3 changed files with 29 additions and 37 deletions
-24
View File
@@ -128,30 +128,6 @@ namespace System
return combined;
}
public static BigInteger ToBigInteger<T>(this T value, bool isBigEndian = false)
{
BigInteger ret;
switch (typeof(T).Name)
{
case "Byte[]":
var data = value as byte[];
if (isBigEndian)
Array.Reverse(data);
ret = new BigInteger(data.Combine(new byte[] { 0 }));
break;
case "BigInteger":
ret = (BigInteger)Convert.ChangeType(value, typeof(BigInteger));
break;
default:
throw new NotSupportedException($"'{typeof(T).Name}' conversion to 'BigInteger' not supported.");
}
return ret;
}
public static void Swap<T>(ref T left, ref T right)
{
T temp = left;