php代码加密|PHP源码加密——实现方法

php代码加密|PHP源码加密——实现方法

Encipher - PHP代码加密 | PHP源码加密
下载地址:https://github.com/uniqid/encipher

该加密程序是用PHP代码写的,加密后代码无需任何附加扩展,无需安装任何第三方组件,可运行于任何普通 PHP 环境下。

加密方法如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
$app str_replace('\\''/', dirname(__FILE__));
require_once($app '/lib/encipher.min.php');
 
$original $app '/original'//待加密的文件目录
$encoded  $app '/encoded';  //加密后的文件目录
$encipher new Encipher($original$encoded);
 
/**
 * 设置加密模式 false = 低级模式; true = 高级模式
 * 低级模式不使用eval函数
 * 高级模式使用了eval函数
 */
$encipher->advancedEncryption = true;
 
//设置注释内容
$encipher->comments = array(
    'Encipher - the PHP code encode tool',
    'Version: 1.1.1',
    '',
    'The latest version of Encipher can be obtained from:',
    'https://github.com/uniqid/encipher'
);
 
echo "<pre>\n";
$encipher->encode();
echo "</pre>\n";

 

posted @ 2019-02-13 13:16  piwenfei  阅读(9641)  评论(0编辑  收藏  举报