Fix for some failed logins

This commit is contained in:
Hondacrx
2024-11-17 14:19:44 -05:00
parent aa01bf6727
commit 681178ecc7
+4 -2
View File
@@ -328,11 +328,13 @@ namespace Framework.Cryptography
BigInteger x = new(xBytes, true, true);
if ((xBytes[0] & 0x80) != 0)
{
byte[] fix = new byte[65];
fix[64] = 1;
byte[] fix = [1, ..new byte[64]];
x -= new BigInteger(fix, true);
}
if (x.Sign == -1)
return x += N - 1;
return x % (N - 1);
}