用PHP和AES-265算法写了一个文本加解密工具
TextAes
这是一个使用PHP+composer编写的数据加解密工具,使用 AES-256 算法进行加密和解密。前端页面使用bootstrap。
开源地址:https://github.com/MengZe2l/Text-Encryption-and-Decryption-Tools
本地调试/无root服务器搭建方法
先克隆本仓库,使用如下指令开启PHP预览服务:
1
| php -S localhost:8000 -t public
|
Nginx搭建方法一
在你使用的面板上,新建一个站点,把仓库克隆在站点目录,把运行目录设置成public,然后常规操作就行了
Nginx代理搭建方法二
如果你没有面板,可以看着(这是基础模板,需要你自己更改),克隆本仓库到一个目录,要记住这个目录。找到Nginx配置文件,添加如下Server模块:
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| server { listen 443 ssl; server_name example.com;
root 仓库克隆目录/public; index index.php index.html index.htm;
ssl_certificate /etc/ssl/certs/cert.crt; ssl_certificate_key /etc/ssl/private/key.key; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers HIGH:!aNULL:!MD5;
location / { try_files $uri $uri/ /index.php?$query_string; }
location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
location ~ /\.ht { deny all; }
access_log /var/log/nginx/your-site_access.log; error_log /var/log/nginx/your-site_error.log; }
server { listen 80; server_name example.com;
return 301 https://$host$request_uri; }
|