<?php
 
define("PUBLIC_KEY","YOUR_PUBLIC_KEY");    //Secret Key
 
define("PRIVATE_KEY","ABCD1234");        //Eight bit
 
 
require_once("PhpEncryptFiles.inc.php");
 
$phpEncryptFiles=New PhpEncryptFiles(PUBLIC_KEY, PRIVATE_KEY);
 
 
//Example 1
 
$text=" Hello world ! ";
 
 
$str= $phpEncryptFiles->encrypt($text);
 
$dec= $phpEncryptFiles->decrypt($str);
 
 
echo "<hr> Original: ".$text;
 
echo "<hr> Encoded: ".$str;
 
echo "<hr> Decoded: ".$dec;
 
 
 
/*
 
//Example #2
 
 
$text=file_get_contents("RochakChauhan.jpg");
 
$str= $phpEncryptFiles->encrypt($text);
 
 
$mimeType="image/jpeg";
 
$phpEncryptFiles->decryptAndRender($str,$mimeType);
 
*/
 
?>
 
 |