For the rare case that you are using the mcrypt extension at the same time as having phpseclib's mcrypt_compat v1 installed.
mcrypt-compat calls phpseclib's Base.php which calls the mcrypt extension's mcrypt_list_algorithms()
, which is noticeably
slower than calling the polyfill's phpseclib_mcrypt_list_algorithms()
.
See this issue for more details on this issue phpseclib/mcrypt_compat#43
Install this package with Composer as a Nytris package:
$ composer require cwsr/mcrypt-compat-speed-patch
Configure Nytris platform to use this package:
nytris.config.php
:
<?php
declare(strict_types=1);
use Cwsr\McryptPatch\McryptCompatSpeedPatchPackage;
use Nytris\Boot\BootConfig;
use Nytris\Boot\PlatformConfig;
$bootConfig = new BootConfig(new PlatformConfig(__DIR__ . '/var/cache/nytris'));
// ...
$bootConfig->installPackage(new McryptCompatSpeedPatchPackage());
// ...
return $bootConfig;