Loading... # [php 加密解密小程序](https://blog.p2hp.com/archives/2645) php 加密解密小程序,按键盘顺序重新排序字母表 ```php $subject=$_GET['s']; $replace = ['a'=>'q','b'=>'w','c'=>'e','d'=>'r','e'=>'t','f'=>'y','g'=>'u','h'=>'i','i'=>'o','j'=>'p','k'=>'a', 'l'=>'s','m'=>'d','n'=>'f','o'=>'g','p'=>'h','q'=>'j','r'=>'k','s'=>'l','t'=>'z','u'=>'x', 'v'=>'c','w'=>'v','x'=>'b','y'=>'n','z'=>'m']; $encrypt=strtr($subject, $replace); $decrypt=strtr($encrypt, array_flip($replace)); echo '加密:'.$encrypt; echo '解密:'.$decrypt; //输入abcdefg //输出 加密:qwertyu解密:abcdefg ``` 最后修改:2023 年 08 月 09 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏
1 条评论
怎么收藏这篇文章?