Fetch the repository succeeded.
git clone -b v1.0.0 https://gitee.com/lfveeker/tonyenc.git
lihancong/tonyenc
已不再维护,特开此项目对PHP7.4+进行支持加密前记得备份!!!
编译前请在 core.h 中做如下修改:
/* 这里定制你的加密特征头,不限长度,十六进制哦 */
const u_char tonyenc_header[] = {
0x66, 0x88, 0xff, 0x4f,
0x68, 0x86, 0x00, 0x56,
0x11, 0x16, 0x16, 0x18,
};
/* 这里指定密钥,长一些更安全 */
const u_char tonyenc_key[] = {
0x9f, 0x49, 0x52, 0x00,
0x58, 0x9f, 0xff, 0x21,
0x3e, 0xfe, 0xea, 0xfa,
0xa6, 0x33, 0xf3, 0xc6,
};
PHP7请拉取v1.0.0分支:
git clone -b v1.0.0 https://gitee.com/lfveeker/tonyenc.git
PHP8:
git clone https://gitee.com/lfveeker/tonyenc.git
cd tonyenc
phpize
./configure --with-php-config=php-config path
make
make install
将编译好的文件 tonyenc.so 加入到配置项 extension=tonyenc.so,重启 PHP 服务
已编译了以下模块,可供测试(这里的密钥与源代码中的相同):
7.0~7.1版本需要安装有 VC14 运行库
7.2~7.4版本需要安装有 VC15 运行库
8.0+版本需要安装有 VS16 运行库
NTS:Non Thread Safe(非线程安全)
TS:Thread Safe(线程安全)
x64:64位
x86:32位
eg:
# php7.4 64位 非线程安全版
php_tonyenc-1.0.0-7.4-nts-vc15-x64.dll
# php7.4 32位 非线程安全版
php_tonyenc-1.0.0-7.4-nts-vc15-x86.dll
# php7.4 64位 线程安全版
php_tonyenc-1.0.0-7.4-ts-vc15-x64.dll
# php7.4 32位 线程安全版
php_tonyenc-1.0.0-7.4-ts-vc15-x86.dll
其他版本不再赘述,可用的dll文件均在windows-dll目录,请根据自己的PHP版本选择对应的dll
代码中的 tonyenc.php
是加密工具:
php tonyenc.php example.php dir/
这样即可加密 example.php
和 dir
目录下的所有 php 文件,PHP 在运行它们时会自动解密,够简单吧!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.