[PHP加密]②--Crypt
作者:
子木同 | 来源:发表于
2017-09-12 15:35 被阅读6次

Paste_Image.png

Paste_Image.png
<?php
header("content-type:text/html;charset=utf-8");
echo crypt('imooc');//变
echo "<hr/>";
echo crypt('imooc', 'im');//不变 imAqJS/wYeLho
echo "<hr/>";
if (CRYPT_STD_DES) {
echo "DES标准算法:" . crypt("imooc", "this is a test");//只取前两位th
//thBDocQPPusJQ
}
echo "<hr/>";
if (CRYPT_MD5) {
echo "MD5加密:" . crypt("imooc", '$1$imooc show$');
//$1$imooc sh$Y0Q5d7KWr5cxTsVkhmNXb0
}
?>

Paste_Image.png
本文标题:[PHP加密]②--Crypt
本文链接:https://www.haomeiwen.com/subject/ttucsxtx.html
网友评论