mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-13 01:27:40 +01:00
BigInteger/Engines/PHP: fix issue with regular barrett engine
This commit is contained in:
parent
410e5aed96
commit
f01cc6b099
@ -185,7 +185,7 @@ abstract class Barrett extends Base
|
|||||||
// m.length + 1
|
// m.length + 1
|
||||||
$result = array_slice($x, 0, $n_length + 1);
|
$result = array_slice($x, 0, $n_length + 1);
|
||||||
// m.length + 1
|
// m.length + 1
|
||||||
$temp = self::multiplyLower($temp, false, $n, false, $n_length + 1);
|
$temp = self::multiplyLower($temp, false, $n, false, $n_length + 1, $class);
|
||||||
// $temp == array_slice($class::regularMultiply($temp, false, $n, false)->value, 0, $n_length + 1)
|
// $temp == array_slice($class::regularMultiply($temp, false, $n, false)->value, 0, $n_length + 1)
|
||||||
|
|
||||||
if (self::compareHelper($result, false, $temp[self::VALUE], $temp[self::SIGN]) < 0) {
|
if (self::compareHelper($result, false, $temp[self::VALUE], $temp[self::SIGN]) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user