PHP code example of openlss / lib-crypt
1. Go to this page and download the library: Download openlss/lib-crypt 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/ */
openlss / lib-crypt example snippets
use \LSS\Crypt;
//create keys
$iv_key = Crypt::IVCreate();
$crypt_key = Crypt::keyCreate();
$crypt = Crypt::_get($crypt_key,$iv_key);
$crypted_str = $crypt->encrypt('my string'); //returns base64 encoded crypted string
$var = $crypt->decrypt($crypted_str); //returns 'my string'