PHP code example of djm56 / php-string-encryption
1. Go to this page and download the library: Download djm56/php-string-encryption 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/ */
djm56 / php-string-encryption example snippets
define('ENCRYPTION_KEY', 'abcdefghij1234');
define('ENCRYPTION_TYPE', 'AES-128-CBC');
use StringEncryption\Encryption;
$encryptedtext = Encryption::encrypt('test string');
$decryptedtext = Encryption::decrypt('encrypted string');