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