首頁  >  文章  >  php教程  >  不上头条不罢休!什么文件也加密?

不上头条不罢休!什么文件也加密?

WBOY
WBOY原創
2016-06-06 19:32:361386瀏覽

好不好?强不强? http://www.codepearl.com/files/200.html PHP 源码与演示: 源码出处演示出处 ?php//转自:http://www.codepearl.comdefine("PUBLIC_KEY","YOUR_PUBLIC_KEY");//Secret Keydefine("PRIVATE_KEY","ABCD1234");//Eight bitrequire_once("PhpE

好不好?强不强?

http://www.codepearl.com/files/200.html PHP

源码与演示:源码出处 演示出处

不上头条不罢休!什么文件也加密? 不上头条不罢休!什么文件也加密?
<?php

//转自:http://www.codepearl.com
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;


?>
<?php

//转自:http://www.codepearl.com


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);


$text=file_get_contents("weisuo.jpg");
$str= $phpEncryptFiles->encrypt($text);

$mimeType="image/jpeg";
$phpEncryptFiles->decryptAndRender($str,$mimeType);

?>
<?php


echo "移步:http://www.codepearl.com/files/200.html";
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn