cwsr / mcrypt-compat-list-algs-patch
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=8.1
- asmblah/php-code-shift: ^0.1
- nytris/nytris: ^0.1
- phpseclib/mcrypt_compat: ^1.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.2
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;