nguyenanhung / phpaes
AES cipher - FIPS 192 compliant
Installs: 5 549
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 31
pkg:composer/nguyenanhung/phpaes
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: ^4.0
- squizlabs/php_codesniffer: ^2.0
This package is auto-updated.
Last update: 2025-09-10 14:32:42 UTC
README
FIPS-192 compliant AES cipher.
Supported key lengths:
- 128 bits
- 192 bits
- 256 bits
Support block modes:
- ECB: Electronic Code Book
- CBC: Cipher Block Chaining
- CFB: Cipher Feedback
- OFB: Output Feedback
Supported padding schemes:
- null byte (0x00)
Installation
Install via composer:
composer require phpaes/phpaes
Basic Usage
use nguyenanhung\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
Running Tests
vendor/bin/phpunit
Code Style
This project adheres to PSR-2 formatting.
vendor/bin/phpcs --extensions=php --report=summary --standard=PSR2 ./src ./tests