PHPackages                             mradang/encryption - 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. mradang/encryption

ActiveLibrary[Security](/categories/security)

mradang/encryption
==================

encryption

v1.2(7y ago)0454MITPHPPHP &gt;=7.1.3

Since Oct 4Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mradang/encryption)[ Packagist](https://packagist.org/packages/mradang/encryption)[ RSS](/packages/mradang-encryption/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

对称加密、解密函数
=========

[](#对称加密解密函数)

安装
--

[](#安装)

```
composer require mradang/encryption

```

使用
--

[](#使用)

```
// 加密，默认使用 AES-256-CBC 加密，$key 长度为32
$encrypter = new \mradang\Encryption\Encrypter($key);
$encrypt = $encrypter->encrypt($text);

// 解密
$encrypter = new \mradang\Encryption\Encrypter($key);
$decrypt = $encrypter->decrypt($encrypt);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Every ~1 days

Total

2

Last Release

2778d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b19d9f12d42f3aa6dec88a2d59f8d2b452ee0c4bb7504ef5e9f06938df1e9d0b?d=identicon)[mradang](/maintainers/mradang)

---

Top Contributors

[![mradang](https://avatars.githubusercontent.com/u/1206671?v=4)](https://github.com/mradang "mradang (7 commits)")

### Embed Badge

![Health badge](/badges/mradang-encryption/health.svg)

```
[![Health](https://phpackages.com/badges/mradang-encryption/health.svg)](https://phpackages.com/packages/mradang-encryption)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

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

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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