Skip to content

Commit

Permalink
BigInteger: use GMP if it's available
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Jul 26, 2023
1 parent 718503a commit f01892a
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 @@ -136,7 +136,7 @@ private static function initialize_static_variables()
{
if (!isset(self::$mainEngine)) {
$engines = [
['GMP'],
['GMP', ['DefaultEngine']],
['PHP64', ['OpenSSL']],
['BCMath', ['OpenSSL']],
['PHP32', ['OpenSSL']],
Expand All @@ -145,7 +145,7 @@ private static function initialize_static_variables()
];
foreach ($engines as $engine) {
try {
self::setEngine($engine[0], isset($engine[1]) ? $engine[1] : []);
self::setEngine($engine[0], $engine[1]);
break;
} catch (\Exception $e) {
}
Expand Down

1 comment on commit f01892a

@terrafrost
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1928

Please sign in to comment.