zmisgod / php-aes
Encryption and decryption using asymmetric cryptography (using PHP OpenSSL extention)
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
Type:libary
Requires
- ext-openssl: *
This package is not auto-updated.
Last update: 2025-05-03 07:55:49 UTC
README
based on PHP OpenSSL extension
This Aes Class using OpenSSL extension of PHP. The official of PHP manual suggest us using OpenSSL to replace Mcrypt extention
before using this
- Check your php extension and find OpenSSL.
php -m | grep openssl
install
composer require zmisgod/php-aes
usage
Here is a example
<?php
require_once __DIR__ . '/vendor/autoload.php';
$aes = new SimpleAes\Aes();
$encrypt = $aes->encrypt( 'star zmisgod' );
echo $encrypt . PHP_EOL;
//output : xviTncBNkTIg/44a27uGzw==
echo $aes->decrypt( $encrypt ) . PHP_EOL;
//output : star zmisgod