mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-08 23:00:58 +00:00
BigInteger/Engines/PHP: HAC 14.42.2 does mod $b^{k+1}$
This commit is contained in:
parent
5e9c67b2d0
commit
5eec16041d
@ -131,6 +131,11 @@ abstract class EvalBarrett extends Base
|
|||||||
$code.= self::generateInlineMultiply('temp', $m, 'temp2', $class);
|
$code.= self::generateInlineMultiply('temp', $m, 'temp2', $class);
|
||||||
$code.= self::generateInlineTrim('temp2');
|
$code.= self::generateInlineTrim('temp2');
|
||||||
|
|
||||||
|
if ($class::BASE == 26) {
|
||||||
|
$code.= '$n = array_slice($n, 0, ' . (count($m) + 1) . ');
|
||||||
|
$temp2 = array_slice($temp2, 0, ' . (count($m) + 1) . ');';
|
||||||
|
}
|
||||||
|
|
||||||
$code.= self::generateInlineSubtract2('n', 'temp2', 'temp', $class);
|
$code.= self::generateInlineSubtract2('n', 'temp2', 'temp', $class);
|
||||||
|
|
||||||
$subcode = self::generateInlineSubtract1('temp', $m, 'temp2', $class);
|
$subcode = self::generateInlineSubtract1('temp', $m, 'temp2', $class);
|
||||||
|
Loading…
Reference in New Issue
Block a user