Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-06 19:32:36
Original
1383 people have browsed it

好不好?强不强? 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;


?>
Copy after login
<?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);

?>
Copy after login
<?php


echo "移步:http://www.codepearl.com/files/200.html";
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template