arispati / crypto-aes
AES crypto library which can be used in php and javascript
Installs: 243
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/arispati/crypto-aes
Requires
- php: >=7
This package is auto-updated.
Last update: 2025-09-10 17:31:47 UTC
README
AES crypto library which can be used in php and javascript (PHP Version).
If you want to use this library in javascript use the CryptoAESJS.
How to Install
- Install with composer
composer require arispati/crypto-aes
How to Use
use Arispati\CryptoAES\CryptoAES; // Set the secret key $secretKey = 's3cr3tK3y'; // default secret key // Initilize CryptoAES Class $crypto = new CryptoAES($secretKey); // Encrypt $encrypted = $crypto->encrypt('Hello World'); // {"ct":"7aV+gq6hm69IO1\/pyjPliQ==","iv":"ece63be3d70d2e275396e3b82a43f425","s":"655cc08d5bcfd469"} // Decrypt $decrypted = $crypto->decrypt($encrypted); // "Hello World"