Registry / crypto / phpseclib-mcrypt-compat

phpseclib-mcrypt-compat

JSON →
library2.0.8phppackagistunverified

PHP 5.x-8.x polyfill for mcrypt extension

composer require phpseclib/mcrypt_compat
INSTALL
IMPORT
SIG · PHPSECLIB-MCRYPT-C
P
phpseclib-mcrypt-compat
cryptophpv2.0.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MCrypt
use phpseclib\Crypt\MCrypt;

Encrypt a string using the mcrypt polyfill.

use phpseclib\Crypt\MCrypt; $mcrypt = new MCrypt(); $encrypted = $mcrypt->encrypt('Hello World', 'secret'); echo base64_encode($encrypted);
Debug
Known issues
breakingThe mcrypt extension is deprecated in PHP 7.1 and removed in PHP 7.2; this polyfill provides compatibility but may have performance implications.
fix
Consider using OpenSSL or sodium for new projects.
affects: >=7.1
Upgrade
Version history
2.0.8latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
26
Amazon
1
Resources
phpseclib-mcrypt-compat — pip install phpseclib-mcrypt-compat · libregistry