phpaes / phpaes
AES cipher - FIPS 192 compliant
Installs: 104 568
Dependents: 4
Suggesters: 0
Security: 0
Stars: 45
Watchers: 9
Forks: 31
Open Issues: 1
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: ^4.0
- squizlabs/php_codesniffer: ^2.0
This package is not auto-updated.
Last update: 2024-04-17 00:55:38 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 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