Fix for some failed logins
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user