Skip to content

Commit

Permalink
README: discuss PHPSECLIB_MCRYPT_TARGET_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Feb 23, 2024
1 parent 8c338db commit 83d3d72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ composer require phpseclib/mcrypt_compat
- stream

mcrypt_compat's `ncfb` implementation has some incompatibles with mcrypt's implementation where `mcrypt_generic` and `mdecrypt_generic` are concerned. The unit tests elaborate.

## Emulating older PHP versions

The mcrypt extension's behavior underwent changes as new versions of PHP were released. By default mcrypt_compat emulates the behavior of PHP 7.1 but if you need to emulate how mcrypt behaved in, say, PHP 5.3.0, you may do so by doing `define('PHPSECLIB_MCRYPT_TARGET_VERSION', '5.3.0');` before including vendor/autoload.php (if you're using this with Composer).

0 comments on commit 83d3d72

Please sign in to comment.