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

ActiveLibrary[Security](/categories/security)

phpaes/phpaes
=============

AES cipher - FIPS 192 compliant

3.1.0(8y ago)48172.4k↓21.3%30[1 issues](https://github.com/phillipsdata/phpaes/issues)3MITPHPPHP &gt;=5.3

Since Jun 5Pushed 8y ago7 watchersCompare

[ Source](https://github.com/phillipsdata/phpaes)[ Packagist](https://packagist.org/packages/phpaes/phpaes)[ RSS](/packages/phpaes-phpaes/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (2)Versions (3)Used By (3)

PhpAes
======

[](#phpaes)

[![Build Status](https://camo.githubusercontent.com/ad407dbb4fd3890df4f2ac108146827fcad8b8d90d5a1089a3812b83591f1b70/68747470733a2f2f7472617669732d63692e6f72672f7068696c6c697073646174612f7068706165732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phillipsdata/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 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

40

—

FairBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3090d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[mews/purifier

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

2.0k18.7M143](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k37](/packages/paragonie-ecc)

PHPackages © 2026

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