PHP code example of micheledef / encrypt-decrypt

1. Go to this page and download the library: Download micheledef/encrypt-decrypt library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

micheledef / encrypt-decrypt example snippets

sh
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