PHPackages                             spomky-labs/php-aes-gcm - 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. spomky-labs/php-aes-gcm

ActiveLibrary[Security](/categories/security)

spomky-labs/php-aes-gcm
=======================

AES GCM (Galois Counter Mode) PHP implementation.

v1.2.1(7y ago)724.9M—3.4%23[2 issues](https://github.com/Spomky-Labs/php-aes-gcm/issues)20MITPHPPHP &gt;=5.4

Since Apr 28Pushed 2y ago5 watchersCompare

[ Source](https://github.com/Spomky-Labs/php-aes-gcm)[ Packagist](https://packagist.org/packages/spomky-labs/php-aes-gcm)[ Docs](https://github.com/Spomky-Labs/php-aes-gcm)[ RSS](/packages/spomky-labs-php-aes-gcm/feed)WikiDiscussions v1.x Synced 1mo ago

READMEChangelog (4)Dependencies (5)Versions (6)Used By (20)

AES GCM (Galois Counter Mode) PHP Implementation
================================================

[](#aes-gcm-galois-counter-mode-php-implementation)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/00d03f39217efbd5a200c046952fe8087c3e3e58cce24fd94623094e7165dd32/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f53706f6d6b792d4c6162732f7068702d6165732d67636d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Spomky-Labs/php-aes-gcm/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/942d92cf3931fdc03a99264c0febeebb0be5993773443ce2cf9c7f0ddc2ad1f4/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f53706f6d6b792d4c6162732f7068702d6165732d67636d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Spomky-Labs/php-aes-gcm?branch=master)

[![Build Status](https://camo.githubusercontent.com/ae4cfb5c1e79db292c2c044d8ce401ead97600315cfd5e2cc52fc8425cdfa241/68747470733a2f2f7472617669732d63692e6f72672f53706f6d6b792d4c6162732f7068702d6165732d67636d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Spomky-Labs/php-aes-gcm)[![HHVM Status](https://camo.githubusercontent.com/61c854791001cda2154c9dd0664cc15c5f656e0dc03a7d7a3dfde137c99d6200/687474703a2f2f6868766d2e683463632e64652f62616467652f73706f6d6b792d6c6162732f7068702d6165732d67636d2e737667)](http://hhvm.h4cc.de/package/spomky-labs/php-aes-gcm)[![PHP 7 ready](https://camo.githubusercontent.com/4e4ea52a80105a8e3f1701381ac36abefbbb65f5c176fc2ad75cad01b0f64726/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f53706f6d6b792d4c6162732f7068702d6165732d67636d2f62616467652e737667)](https://travis-ci.org/Spomky-Labs/php-aes-gcm)

[![SensioLabsInsight](https://camo.githubusercontent.com/f36451a243ce94485b165a1d68778d07b292d75dc6ec78d453bcf3d4841b967e/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f31343630373131632d643131642d343836632d613733612d3832393064336530333436302f6269672e706e67)](https://insight.sensiolabs.com/projects/1460711c-d11d-486c-a73a-8290d3e03460)

[![Latest Stable Version](https://camo.githubusercontent.com/5ab5a68f7e325148e75f0c01b51fe8f52fd4c8a66be3d240eb757cc15c43fe75/68747470733a2f2f706f7365722e707567782e6f72672f53706f6d6b792d4c6162732f7068702d6165732d67636d2f762f737461626c652e706e67)](https://packagist.org/packages/Spomky-Labs/php-aes-gcm)[![Total Downloads](https://camo.githubusercontent.com/b2d09642d3ee309c1f95b9df57e03516ac1835149b32f2b3a0d0b073c37524ce/68747470733a2f2f706f7365722e707567782e6f72672f53706f6d6b792d4c6162732f7068702d6165732d67636d2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/Spomky-Labs/php-aes-gcm)[![Latest Unstable Version](https://camo.githubusercontent.com/19b9c8ae51b604546fc6be752b66e196c50af9c4101ce220c115f2e6e0fea57c/68747470733a2f2f706f7365722e707567782e6f72672f53706f6d6b792d4c6162732f7068702d6165732d67636d2f762f756e737461626c652e706e67)](https://packagist.org/packages/Spomky-Labs/php-aes-gcm)[![License](https://camo.githubusercontent.com/0cc7922ae9e1a81fcf4b0a8057f5fc7bf2fd04f0f90c5e64df08b55028ae8553/68747470733a2f2f706f7365722e707567782e6f72672f53706f6d6b792d4c6162732f7068702d6165732d67636d2f6c6963656e73652e706e67)](https://packagist.org/packages/Spomky-Labs/php-aes-gcm) [![GuardRails badge](https://camo.githubusercontent.com/35545215929a79ac027b526210bc5ec1114f65446a02a20e6fc0ed7f6e15ac2e/68747470733a2f2f6261646765732e70726f64756374696f6e2e67756172647261696c732e696f2f53706f6d6b792d4c6162732f7068702d6165732d67636d2e737667)](https://www.guardrails.io)

The Release Process
===================

[](#the-release-process)

The release process [is described here](doc/Release.md).

Prerequisites
=============

[](#prerequisites)

This library needs at least [![PHP 5.4+](https://camo.githubusercontent.com/d99081cd5ddc5e37f8911ad464cb5dc3442d86b2eb940a05bbdeb0a16a3599ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e342532422d6666363962342e737667)](https://camo.githubusercontent.com/d99081cd5ddc5e37f8911ad464cb5dc3442d86b2eb940a05bbdeb0a16a3599ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e342532422d6666363962342e737667).

It has been successfully tested using `PHP 5.4` to `PHP 7.1`, `HHVM` and nightly branches.

If you use PHP 7.1+, this library has very good performance. **If you do not use PHP 7.1+, we highly recommend you to install the [PHP Crypto extension](https://github.com/bukka/php-crypto).**This extension drastically increase the performance of this library. With our pure PHP method, you will have low performance.

Installation
============

[](#installation)

The preferred way to install this library is to rely on Composer:

```
composer require "spomky-labs/php-aes-gcm"
```

How to use
==========

[](#how-to-use)

```
