PHPackages                             fastwhale/yii2-aes - 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. fastwhale/yii2-aes

ActiveYii2-extension[Security](/categories/security)

fastwhale/yii2-aes
==================

Yii2 AES Encrypt&amp;&amp;Decrypt

V1.0.1(2y ago)067↓33.3%1MITPHP

Since Mar 25Pushed 2y ago2 watchersCompare

[ Source](https://github.com/fastwhale/yii2-aes)[ Packagist](https://packagist.org/packages/fastwhale/yii2-aes)[ RSS](/packages/fastwhale-yii2-aes/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Yii2-AES
========

[](#yii2-aes)

Yii2 AES Encrypt &amp;&amp; Decrypt

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist fastwhale/yii2-aes "*"

```

or add

```
"fastwhale/yii2-aes": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Aes init

```
'components' => [
    ...
    'aes' => [
        'class' => 'fastwhale\yii2\aes\Aes',
        'key'   => 'Y34lM1IyOSUTEa5h', // The encrypt & decrypt key.
        'iv'    => 'jKWFi17PZhpy08In', // A non-NULL Initialization Vector, default: 397e2eb61307109f.
    ]
  ...
]
// Global Use
$aesMcrypt = Yii::$app->aes;

// More Use
$aesMcrypt = Yii::createObject([
    'class' => 'fastwhale\yii2\aes\Aes',
    'key'   => 'Y34lM1IyOSUTEa5h', // The encrypt & decrypt key.
    'iv'    => 'jKWFi17PZhpy08In', // A non-NULL Initialization Vector, default: 397e2eb61307109f.
]);
```

Example:

```
$content = "hello world";

echo '' . PHP_EOL;
echo 'mcrypt 加密:' . PHP_EOL;
$aesMcrypt = Yii::$app->aes;
var_dump($data = Yii::$app->aes->encrypt($content));
echo 'mcrypt 解密:' . PHP_EOL;
var_dump(Yii::$app->aes->decrypt($data));
echo ''. PHP_EOL;
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

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 ~1254 days

Total

2

Last Release

985d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22ecd713318e756f10dba01c3f7b56a2012cebe3c64d72261d0be24a03d11342?d=identicon)[fastwhale](/maintainers/fastwhale)

---

Top Contributors

[![DoveChen](https://avatars.githubusercontent.com/u/12093494?v=4)](https://github.com/DoveChen "DoveChen (3 commits)")

---

Tags

aesyii2extension

### Embed Badge

![Health badge](/badges/fastwhale-yii2-aes/health.svg)

```
[![Health](https://phpackages.com/badges/fastwhale-yii2-aes/health.svg)](https://phpackages.com/packages/fastwhale-yii2-aes)
```

###  Alternatives

[nickcv/yii2-encrypter

Openssl Encrypter for Yii2

19640.0k1](/packages/nickcv-yii2-encrypter)[hyperia/yii2-secure-headers

Secure headers for your Yii2 app

21189.5k](/packages/hyperia-yii2-secure-headers)[juliardi/yii2-captcha

Captcha library wrapper for Yii2

167.9k](/packages/juliardi-yii2-captcha)

PHPackages © 2026

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