PHP code example of ammarfaizi2 / icecrypt
1. Go to this page and download the library: Download ammarfaizi2/icecrypt 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/ */
ammarfaizi2 / icecrypt example snippets
ceCrypt\IceCrypt;
$string = "Hello World!";
$key = "secret12345";
// encrypt
$encrypted_string = IceCrypt::encrypt($string, $key);
echo "Encrypted string : " . $encrypted_string . "\n";
// decrypt
$decrypted_string = IceCrypt::decrypt($encrypted_string, $key);
echo "Decrypted string : " . $decrypted_string . "\n";