PHPackages                             iescarro/gibberish-aes-php - 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. iescarro/gibberish-aes-php

ActiveLibrary[Security](/categories/security)

iescarro/gibberish-aes-php
==========================

v1.4.0(6mo ago)00MITPHP

Since Oct 16Pushed 6mo agoCompare

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

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

Gibberish AES, a PHP Implementation
===================================

[](#gibberish-aes-a-php-implementation)

See Gibberish AES javascript encryption library,

An important note: The complementary JavaScript project Gibberish AES has been deprecated, see [mdp/gibberish-aes#25](https://github.com/mdp/gibberish-aes/issues/25)
Consider finding alternative PHP and JavaScript solutions.

This class is based on initial code proposed by nbari at dalmp dot com

Live Demo
---------

[](#live-demo)

Requirements:
-------------

[](#requirements)

- OpenSSL functions installed and PHP version &gt;= 5.3.3

or

- Mcrypt functions installed and PHP version &lt; 7.1.0-alpha

For PHP under version 7 it is recommendable you to install within your project "PHP 5.x support for random\_bytes() and random\_int()", [https://github.com/paragonie/random\_compat](https://github.com/paragonie/random_compat)

Usage Example:
--------------

[](#usage-example)

```
echo '';

// This is a secret pass-phrase, keep it in a safe place and don't loose it.
$pass = 'my secret pass-phrase, it should be long';
echo '$pass = '.$pass;
echo '';
// The string to be encrypted.
$string = 'my secret message';
echo '$string = '.$string;
echo '';
echo '';

// The default key size is 256 bits.
$old_key_size = GibberishAES::size();

echo 'Encryption and decryption using a 256-bit key:';
echo '';
GibberishAES::size(256);
// This is the result after encryption of the given string.
$encrypted_string = GibberishAES::enc($string, $pass);
// This is the result after decryption of the previously encrypted string.
// $decrypted_string == $string (should be).
$decrypted_string = GibberishAES::dec($encrypted_string, $pass);
echo '$encrypted_string = '.$encrypted_string;
echo '';
echo '$decrypted_string = '.$decrypted_string;
echo '';
echo '';

echo 'Encryption and decryption using a 192-bit key:';
echo '';
GibberishAES::size(192);
$encrypted_string = GibberishAES::enc($string, $pass);
$decrypted_string = GibberishAES::dec($encrypted_string, $pass);
echo '$encrypted_string = '.$encrypted_string;
echo '';
echo '$decrypted_string = '.$decrypted_string;
echo '';
echo '';

echo 'Encryption and decryption using a 128-bit key:';
echo '';
GibberishAES::size(128);
$encrypted_string = GibberishAES::enc($string, $pass);
$decrypted_string = GibberishAES::dec($encrypted_string, $pass);
echo '$encrypted_string = '.$encrypted_string;
echo '';
echo '$decrypted_string = '.$decrypted_string;
echo '';
echo '';

// Restore the old key size.
GibberishAES::size($old_key_size);
```

Author: Ivan Tcholakov, 2012-2021.
License: The MIT License (MIT),

A fragment of code is under the New BSD License, George Argyros, 2012.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance66

Regular maintenance activity

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.9% 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

208d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2943177515df12803ffcedcb58d0134bc17cbdfcbea2ec885cc2377ce4c82709?d=identicon)[iescarro](/maintainers/iescarro)

---

Top Contributors

[![ivantcholakov](https://avatars.githubusercontent.com/u/1438104?v=4)](https://github.com/ivantcholakov "ivantcholakov (46 commits)")[![iescarro](https://avatars.githubusercontent.com/u/334216?v=4)](https://github.com/iescarro "iescarro (3 commits)")

### Embed Badge

![Health badge](/badges/iescarro-gibberish-aes-php/health.svg)

```
[![Health](https://phpackages.com/badges/iescarro-gibberish-aes-php/health.svg)](https://phpackages.com/packages/iescarro-gibberish-aes-php)
```

###  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)
