PHPackages                             lizhibin/php-mcrypt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. lizhibin/php-mcrypt

ActiveLibrary[Security](/categories/security)

lizhibin/php-mcrypt
===================

php-des library

v1.0.1.x-dev(9y ago)112.0k4MITPHPPHP &gt;=5.3.0

Since Mar 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/lizhibin205/lizhibin-php-mcrypt)[ Packagist](https://packagist.org/packages/lizhibin/php-mcrypt)[ Docs](https://github.com/lizhibin205/lizhibin-php-mcrypt)[ RSS](/packages/lizhibin-php-mcrypt/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

lizhibin/php-mcrypt - Library
=============================

[](#lizhibinphp-mcrypt---library)

"PHP加密解密类库"

Install via "composer require"
==============================

[](#install-via-composer-require)

```
composer require lizhibin/php-mcrypt dev-master
```

Usage:
======

[](#usage)

```
$desEncrypt = new \Mcrypt\DesEncryptor("key", "iv");
```

Example 1: (3Des Encrypt and Decrypt)

```
use Mcrypt\DesEncryptor;
use Mcrypt\String;

require 'bootstrap.php';

$desEncryptor = new DesEncryptor("1234567890123456", "12345678");
//设置加密key长度
$desEncryptor->setKeySize(192);
//设置加密方式，目前仅支持MCRYPT_MODE_CBC
$desEncryptor->setMode(MCRYPT_MODE_CBC);
//字符串补码，可设置为String::zeroPadding，String::pkcs5Padding，String::pkcs7Padding
$desEncryptor->setPaddingMode(String::pkcs7Padding);

$mcryptResult = $desEncryptor->encrypt3DES("hello world!");
echo base64_encode($mcryptResult), PHP_EOL;
echo $desEncryptor->decrypt3DES($mcryptResult);
//output:
//tpD3+3PSR/Tx0saMLxJVUg==
//hello world!
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3385d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13945851?v=4)[zhibin](/maintainers/lizhibin205)[@lizhibin205](https://github.com/lizhibin205)

---

Top Contributors

[![lizhibin205](https://avatars.githubusercontent.com/u/13945851?v=4)](https://github.com/lizhibin205 "lizhibin205 (8 commits)")

---

Tags

securitydes mcrypt

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lizhibin-php-mcrypt/health.svg)

```
[![Health](https://phpackages.com/badges/lizhibin-php-mcrypt/health.svg)](https://phpackages.com/packages/lizhibin-php-mcrypt)
```

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k455.2M1.5k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k170.7M239](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.0M134](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41582.2M138](/packages/robrichards-xmlseclibs)[voku/anti-xss

anti xss-library

70917.6M90](/packages/voku-anti-xss)[spatie/laravel-csp

Add CSP headers to the responses of a Laravel app

86110.6M23](/packages/spatie-laravel-csp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
