Fix for some failed logins
This commit is contained in:
@@ -328,11 +328,13 @@ namespace Framework.Cryptography
|
|||||||
BigInteger x = new(xBytes, true, true);
|
BigInteger x = new(xBytes, true, true);
|
||||||
if ((xBytes[0] & 0x80) != 0)
|
if ((xBytes[0] & 0x80) != 0)
|
||||||
{
|
{
|
||||||
byte[] fix = new byte[65];
|
byte[] fix = [1, ..new byte[64]];
|
||||||
fix[64] = 1;
|
|
||||||
x -= new BigInteger(fix, true);
|
x -= new BigInteger(fix, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (x.Sign == -1)
|
||||||
|
return x += N - 1;
|
||||||
|
|
||||||
return x % (N - 1);
|
return x % (N - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user