Skip to content

Commit

Permalink
BigInteger: phpseclib 2.0 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Feb 24, 2024
1 parent 0777e70 commit 2870c8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phpseclib/Math/BigInteger.php
Original file line number Diff line number Diff line change
Expand Up @@ -736,13 +736,13 @@ function toString()
*/
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;
}

Expand Down

0 comments on commit 2870c8f

Please sign in to comment.