This article mainly introduces the methods and principles of PHP reversible encryption. Interested friends can refer to it. I hope it will be helpful to everyone.
The PHP code is as follows:
key); } return $txt=urlencode(base64_encode(urlencode($txt))); } function decode($txt){ $txt=urldecode(base64_decode($txt)); for($i=0;$ikey); } return $txt; } } ?>
discuz encryption and decryption:
0)&&substr($result,10,16)==substr(md5(substr($result,26).$keyb),0,16)){ returnsubstr($result,26); }else{ return''; } }else{ return $keyc.str_replace('=','',base64_encode($result)); } } ?>
Summary:The above is the entire content of this article , I hope it can be helpful to everyone’s study.
Related recommendations:
Detailed explanation of several methods of staticizing pages in PHP
php implements the same DES encryption and decryption method as c
#PHP practical tutorial on filtering, verification, escaping and password method
The above is the detailed content of PHP reversible encryption methods and principles. For more information, please follow other related articles on the PHP Chinese website!