PHP实现加密的几种方式介绍

1. MD5加密

不可逆加密
md5($password)
2. Crype加密
string crypt ( string $str [, string $salt ] )
不可逆

3. Sha1加密
string sha1 ( string $str [, bool $raw_output = false ] )
不可逆

4. URL加密
可逆加密
urlencode ( string $str )
urldecode($encodeUrl)

5. Base64信息编码加密

base64_encode ( string $data )
base64_decode ( string $data [, bool $strict = false ] )

posted @ 2017-03-13 12:00  一千二公子  阅读(468)  评论(0编辑  收藏  举报