mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-26 08:38:29 +00:00
BigInteger: phpseclib 2.0 updates
This commit is contained in:
parent
0777e700b9
commit
2870c8fab3
@ -736,13 +736,13 @@ class BigInteger
|
||||
*/
|
||||
function getLength()
|
||||
{
|
||||
if (MATH_BIGINTEGER_MODE != MATH_BIGINTEGER_MODE_INTERNAL) {
|
||||
if (MATH_BIGINTEGER_MODE != self::MODE_INTERNAL) {
|
||||
return strlen($this->toBits());
|
||||
}
|
||||
|
||||
$max = count($this->value) - 1;
|
||||
return $max != -1 ?
|
||||
$max * MATH_BIGINTEGER_BASE + ceil(log($a->value[$max] + 1, 2)) :
|
||||
$max * self::$base + ceil(log($a->value[$max] + 1, 2)) :
|
||||
0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user