Download the PHP package spomky-labs/php-aes-gcm without Composer
On this page you can find all versions of the php package spomky-labs/php-aes-gcm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
More information about spomky-labs/php-aes-gcm
Files in spomky-labs/php-aes-gcm
Informations about the package php-aes-gcm
AES GCM (Galois Counter Mode) PHP Implementation
The Release Process
The release process is described here.
This library needs at least .
It has been successfully tested using
PHP 5.4 to
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. This extension drastically increase the performance of this library. With our pure PHP method, you will have low performance.
The preferred way to install this library is to rely on Composer:
How to use
Some implementations of this cypher may append the tag at the end of the ciphertext. This is commonly used by the Java implementation for example.
This library provides an easy way to produce such a ciphertext and read it.
By default the tag length is 128 bits. This value is highly recommended, however you may need to use another tag length. As per the cypher specification, the tag length could be 128, 120, 112, 104 or 96 bits.
The tag length is automatically calculated during the decryption operation with the method
However, if the tag is appended at the end of the ciphertext and if it is not 128 bits, then it must be set:
I bring solutions to your problems and answer your questions.
If you really love that project and the work I have done or if you want I prioritize your issues, then you can help me out for a couple of :beers: or more!
Requests for new features, bug fixed and all other ideas to make this library useful are welcome. The best contribution you could provide is by fixing the opened issues where help is wanted
Please make sure to follow these best practices.
test folder, a little script to run encryption and decryption benchmarks is available.
You can run it on your environment to check how many time the encryption/decryption operations take.
This library is release under MIT licence.