FIPS-192 compliant AES cipher.
- 128 bits
- 192 bits
- 256 bits
- ECB: Electronic Code Book
- CBC: Cipher Block Chaining
- CFB: Cipher Feedback
- OFB: Output Feedback
- null byte (0x00)
Install via composer:
composer require phpaes/phpaes
use PhpAes\Aes;
$aes = new Aes('abcdefgh01234567', 'CBC', '1234567890abcdef');
$y = $aes->encrypt('hello world!');
$x = $aes->decrypt($y);
echo base64_encode($y);
echo $x;
vendor/bin/phpunit
This project adheres to PSR-2 formatting.
vendor/bin/phpcs --extensions=php --report=summary --standard=PSR2 ./src ./tests