micheledef / encrypt-decrypt
Encrypt and Decrypt with a secret key
v1.0.0
2023-03-31 09:26 UTC
Requires
- php: >=7.2
README
Encrypt and Decrypt with a secret key
Install via Composer
composer require micheledef/encrypt-decrypt
Example of use
require 'vendor/autoload.php'; use Micheledef\EncryptDecrypt\Encrypt as Encrypt; use Micheledef\EncryptDecrypt\Decrypt as Decrypt; $string = "Hello World"; $secretkey = "secretkey"; $encrypt = new Encrypt($string, $secretkey); echo $encrypt; // wdjRz+GFy9rX5dc= $decrypt = new Decrypt($encrypt, $secretkey); echo $decrypt; // Hello World