mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-02 09:38:06 +01:00
BigInteger: fix behavior on 32-bit PHP installs
This commit is contained in:
parent
22ee5597d3
commit
0b3cc98084
@ -75,9 +75,12 @@ class PHP32 extends PHP
|
||||
$i = 0;
|
||||
}
|
||||
list(, $digit) = unpack('N', substr($val, $i, 4));
|
||||
if ($digit < 0) {
|
||||
$digit += 0xFFFFFFFF + 1;
|
||||
}
|
||||
$step = count($vals) & 3;
|
||||
if ($step) {
|
||||
$digit >>= 2 * $step;
|
||||
$digit = floor($digit / pow(2, 2 * $step));
|
||||
}
|
||||
if ($step != 3) {
|
||||
$digit &= static::MAX_DIGIT;
|
||||
|
Loading…
Reference in New Issue
Block a user