dentmate / rajahan
PHP package for encryption/decryption using AES algorithm compatible with CryptoJS
0.0.1
2022-09-28 09:12 UTC
Requires (Dev)
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
This package is not auto-updated.
Last update: 2024-11-08 03:42:52 UTC
README
PHP package for encryption/decryption using AES algorithm compatible with CryptoJS.
Algorithm
Cipher | AES-256 |
Mode | CBC |
Key Derivation | evpkdf (OpenSSL custom, MD5, 1 iteration) |
Installation
Installation is best done via Composer, you may use the following command:
composer require dentmate/rajahan
This will add the latest release of rajahan as a module to your project
Example
This is an example code for using this library:
<?php
use DentMate\Rajahan\AES;
$passphrase = 'my passphrase';
$plain = 'example value';
$encrypted = AES::encrypt($plain, $passphrase);
print_r('Encrypted : ' . $encrypted);
$decrypted = AES::decrypt($encrypted, $passphrase);
print_r('Decrypted : ' . $decrypted);
License
Code licensed under Apache 2.0 License.