定制 phpseclib/mcrypt_compat 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phpseclib/mcrypt_compat

最新稳定版本:2.0.7

Composer 安装命令:

composer require phpseclib/mcrypt_compat

包简介

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

README 文档

README

CI Status

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

Supporting mcrypt_compat

Installation

With Composer:

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
  • 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).

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

统计信息

  • 总下载量: 28.19M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 285
  • 点击次数: 4
  • 依赖项目数: 37
  • 推荐数: 13

GitHub 信息

  • Stars: 283
  • Watchers: 8
  • Forks: 59
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04