mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-14 10:53:09 +00:00
BigInteger: update engine preferences
This commit is contained in:
parent
4013d260e0
commit
37c6f5255c
@ -100,10 +100,6 @@ class BigInteger implements \JsonSerializable
|
|||||||
/** @var class-string<Engine> $fqmain */
|
/** @var class-string<Engine> $fqmain */
|
||||||
self::$mainEngine = $fqmain;
|
self::$mainEngine = $fqmain;
|
||||||
|
|
||||||
if (!in_array('Default', $modexps)) {
|
|
||||||
$modexps[] = 'DefaultEngine';
|
|
||||||
}
|
|
||||||
|
|
||||||
$found = false;
|
$found = false;
|
||||||
foreach ($modexps as $modexp) {
|
foreach ($modexps as $modexp) {
|
||||||
try {
|
try {
|
||||||
@ -141,9 +137,12 @@ class BigInteger implements \JsonSerializable
|
|||||||
if (!isset(self::$mainEngine)) {
|
if (!isset(self::$mainEngine)) {
|
||||||
$engines = [
|
$engines = [
|
||||||
['GMP'],
|
['GMP'],
|
||||||
['PHP64', ['OpenSSL']],
|
|
||||||
['BCMath', ['OpenSSL']],
|
['BCMath', ['OpenSSL']],
|
||||||
['PHP32', ['OpenSSL']]
|
['PHP64', ['OpenSSL']],
|
||||||
|
['PHP32', ['OpenSSL']],
|
||||||
|
['PHP64', ['DefaultEngine']],
|
||||||
|
['PHP32', ['DefaultEngine']],
|
||||||
|
['BCMath', ['DefaultEngine']]
|
||||||
];
|
];
|
||||||
foreach ($engines as $engine) {
|
foreach ($engines as $engine) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user