Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phpseclib/mcrypt_compat
PHP 5.x-8.x polyfill for mcrypt extension.
https://github.com/phpseclib/mcrypt_compat
mcrypt mcrypt-extension
Last synced: 9 days ago
JSON representation
PHP 5.x-8.x polyfill for mcrypt extension.
- Host: GitHub
- URL: https://github.com/phpseclib/mcrypt_compat
- Owner: phpseclib
- License: mit
- Created: 2016-04-03T14:34:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-26T14:55:52.000Z (8 months ago)
- Last Synced: 2024-04-14T05:46:19.527Z (7 months ago)
- Topics: mcrypt, mcrypt-extension
- Language: PHP
- Homepage:
- Size: 97.7 KB
- Stars: 268
- Watchers: 10
- Forks: 60
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
# mcrypt_compat
[![CI Status](https://github.com/phpseclib/mcrypt_compat/actions/workflows/ci.yml/badge.svg?branch=master&event=push "CI Status")](https://github.com/phpseclib/mcrypt_compat/actions/workflows/ci.yml?query=branch%3Amaster)
PHP 5.x-8.x polyfill for mcrypt extension.
## Supporting mcrypt_compat
- [Become a backer or sponsor on Patreon](https://www.patreon.com/phpseclib)
- [One-time donation via PayPal or crypto-currencies](http://sourceforge.net/donate/index.php?group_id=198487)
- [Subscribe to Tidelift](https://tidelift.com/subscription/pkg/packagist-phpseclib-mcrypt-compat?utm_source=packagist-phpseclib-mcrypt-compat&utm_medium=referral&utm_campaign=readme)## Installation
With [Composer](https://getcomposer.org/):
```
composer require phpseclib/mcrypt_compat
```## Supported algorithms
- rijndael-128
- rijndael-192
- rijndael-256
- des
- blowfish
- rc2
- tripledes
- arcfour## Unsupported algorithms
- cast-128
- gost
- cast-256
- loki97
- saferplus
- wake
- blowfish-compat
- serpent
- xtea
- enigma## Supported modes
- cbc
- ncfb
- cfb
- ctr
- ecb
- nofb
- ofb
- streammcrypt_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).
## Security contact information
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.