
PHP中常见加密形式:md5()、crypt()、sha1()、URL编码、base64编码.
一、md5()
单向加密。
使用方法:md5(string $str,[bool $default=false])
第二参数不给默认false,如果给true,那么返回的是16字节的原始二进制格式。
例如:
$str = 'dupeng';
echo md5($str);
二、Crypt()加密
单向加密。
语法:crypt(string $str,[string $salt])
$str,需要加密的明文;
$salt,加密时的干扰串。不给...