nguyenanhung / phpaes
AES cipher - FIPS 192 compliant
v4.0.0
2020-10-10 03:34 UTC
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: ^4.0
- squizlabs/php_codesniffer: ^2.0
This package is auto-updated.
Last update: 2024-11-10 12:45:23 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