Skip to content

Commit

Permalink
Prevent error on PHP 8.1 in Int32
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Mar 23, 2022
1 parent 78ae7d7 commit ac99405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core32/Int32.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ public function multiplyLong(array $a, array $b, $baseLog2 = 16)
for ($j = 0; $j < $a_l; ++$j) {
$b_j = $b[$j];
$product = ($a_i * $b_j) + $r[$i + $j];
$carry = ($product >> $baseLog2 & 0xffff);
$r[$i + $j] = ($product - (int) ($carry * $base)) & 0xffff;
$carry = ((int) $product >> $baseLog2 & 0xffff);
$r[$i + $j] = ((int) $product - (int) ($carry * $base)) & 0xffff;
$r[$i + $j + 1] += $carry;
}
}
Expand Down

0 comments on commit ac99405

Please sign in to comment.