简单的加密算法
2019獨角獸企業重金招聘Python工程師標準>>>
<? class cryption {function en($str,$key) {$ret='';$str = base64_encode ($str);for ($i=0; $i<=strlen($str)-1; $i++){$d_str=substr($str, $i, 1);$int =ord($d_str);$int=$int^$key;$hex=strtoupper(dechex($int));$ret.=$hex;}return $ret;}function de($str,$key) {$ret='';for ($i=0; $i<=strlen($str)-1; 0){$hex=substr($str, $i, 2);$dec=hexdec($hex);$dec=$dec^$key;$ret.=chr($dec);$i=$i+2;}return base64_decode($ret);}}$cryption=new cryption; ?>轉載于:https://my.oschina.net/u/591525/blog/141565
總結
- 上一篇: 铁人三项 标准
- 下一篇: LDF文件丢失, 如何仅用MDF文件恢复