【PHP】php源码加密(二)

php-beast 为php一个扩展,可以方便快捷为php代码进行加密处理

一、安装

$ wget [https://github.com/liexusong/php-beast/archive/master.zip](https://github.com/liexusong/php-beast/archive/master.zip)$ unzip master.zip$ cd php-beast-master$ phpize$ ./configure --with-php-config=/usr/local/php/bin/php-config$ sudo make && make install编译好之后修改php.ini配置文件, 加入配置项: extension=beast.so, 重启php-fpm $ service php-fpm restart

二、加密配置项
配置文件位于tool目录下configure.ini文件

src_path = "" //加密项目的路径dst_path = "" //保存加密后的项目的路径expire = "2020-12-31 24:00:00" //过期时间encrypt_type = "DES" //加密方式 DES/AES/BASE64

三、执行加密操作

php encode_files.php

相关文章