PHP code example of pentagonal / simple_encrypt
1. Go to this page and download the library: Download pentagonal/simple_encrypt 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/ */
pentagonal / simple_encrypt example snippets
/**
* Using default encryption mcrypt
*/
Pentagonal\SimpleEncryption\Encryption::encrypt('string to encrypt', 'saltkey');
/**
* Using alternative type
*/
Pentagonal\SimpleEncryption\Encryption::altEncrypt('string to encrypt', 'saltkey');
/**
* Decrypt encrypted string with auto detect encryption use
*/
Pentagonal\SimpleEncryption\Encryption::decrypt('string to decrypt', 'saltkey');
// or can use
Pentagonal\SimpleEncryption\Encryption::altDecrypt('string to decrypt', 'saltkey');