cwsr/mcrypt-compat-list-algs-patch

0.2.0 2025-06-30 19:45 UTC

This package is auto-updated.

Last update: 2025-07-01 14:48:26 UTC


README

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

Usage

Install this package with Composer as a Nytris package:

$ composer install cwsr/mcrypt-list-algorithms-patch

Configuring platform boot config

Configure Nytris platform to use this package:

nytris.config.php:

<?php

declare(strict_types=1);

use Cwsr\McryptPatch\McryptListAlgorithmsPatchPackage;
use Nytris\Boot\BootConfig;
use Nytris\Boot\PlatformConfig;

$bootConfig = new BootConfig(new PlatformConfig(__DIR__ . '/var/cache/nytris'));

// ...

$bootConfig->installPackage(new McryptListAlgorithmsPatchPackage());

// ...

return $bootConfig;