php 加密 解密 密码传输
<?php//使用按位异或运算 加密function encrypt($str) { ???$key = sha1(‘app‘); ???return base64_encode($str ^ $key);}//使用按位异或运算 解密function decrypt($encrypt_str) { ???$key = sha1(‘app‘); ???$str = base64_decode($encrypt_str); ???return $str ^ $key;}//加密$encrypt_str = (encrypt(‘321‘));//解密$str = decrypt($encrypt_str);print_r([‘encrypt_str‘=>$encrypt_str,‘str‘=>$str])?>
php 加密 解密 密码传输
原文地址:https://www.cnblogs.com/-mrl/p/9298213.html