PHPackages                             nguyenanhung/phpaes - 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. nguyenanhung/phpaes

ActiveLibrary[Security](/categories/security)

nguyenanhung/phpaes
===================

AES cipher - FIPS 192 compliant

v4.0.0(5y ago)05.6kMITPHPPHP &gt;=5.3

Since Jun 5Pushed 5y agoCompare

[ Source](https://github.com/nguyenanhung/phpaes)[ Packagist](https://packagist.org/packages/nguyenanhung/phpaes)[ RSS](/packages/nguyenanhung-phpaes/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (2)Versions (4)Used By (0)

PhpAes
======

[](#phpaes)

FIPS-192 compliant AES cipher.

### Supported key lengths:

[](#supported-key-lengths)

- 128 bits
- 192 bits
- 256 bits

### Support block modes:

[](#support-block-modes)

- ECB: Electronic Code Book
- CBC: Cipher Block Chaining
- CFB: Cipher Feedback
- OFB: Output Feedback

### Supported padding schemes:

[](#supported-padding-schemes)

- null byte (0x00)

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

[](#installation)

Install via composer:

```
composer require phpaes/phpaes
```

Basic Usage
-----------

[](#basic-usage)

```
use nguyenanhung\PhpAes\Aes;

$aes = new Aes('abcdefgh01234567', 'CBC', '1234567890abcdef');

$y = $aes->encrypt('hello world!');
$x = $aes->decrypt($y);

echo base64_encode($y);
echo $x;
```

Static Code Analysis
--------------------

[](#static-code-analysis)

### Running Tests

[](#running-tests)

```
vendor/bin/phpunit
```

### Code Style

[](#code-style)

This project adheres to PSR-2 formatting.

```
vendor/bin/phpcs --extensions=php --report=summary --standard=PSR2 ./src ./tests
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 91.3% 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 ~611 days

Total

3

Last Release

2085d ago

Major Versions

v3.1.0 → v4.0.02020-10-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/3694ef9f3367ff9f6bcd668ca1d6726e3c55e6fd379cba9c2d4ab6a24595fbd8?d=identicon)[7135k13m](/maintainers/7135k13m)

---

Top Contributors

[![clphillips](https://avatars.githubusercontent.com/u/682986?v=4)](https://github.com/clphillips "clphillips (21 commits)")[![hungnguyenhp](https://avatars.githubusercontent.com/u/6778496?v=4)](https://github.com/hungnguyenhp "hungnguyenhp (2 commits)")

---

Tags

aesaes-encryptionphp-aesencryptionaescipher

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/nguyenanhung-phpaes/health.svg)

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

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

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

5.6k455.2M1.5k](/packages/phpseclib-phpseclib)[nzo/url-encryptor-bundle

The NzoUrlEncryptorBundle is a Symfony Bundle used to Encrypt and Decrypt data and variables in the Web application or passed through URL

951.1M2](/packages/nzo-url-encryptor-bundle)[mmeyer2k/dcrypt

A petite library of encryption functionality for PHP

97772.6k1](/packages/mmeyer2k-dcrypt)[poly-crypto/poly-crypto

High-level cryptographic functions that are interoperable between NodeJS and PHP 7.1+

128.1k1](/packages/poly-crypto-poly-crypto)

PHPackages © 2026

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