MD5+salt加密

来源:互联网 发布:v版4s支持什么网络 编辑:程序博客网 时间:2024/06/01 13:58

测试文档md5.php:

<?phpfunction do_hash($pwd){  $salt ='lkdfl124g5dstg';  //自己随便输入盐值  return md5($pwd.$salt);}$char="myblog";  //验证使用$salt_pwd = do_hash($_POST['password'])$md5_char = md5($char); $salt_char = do_hash($char); //调用echo "md5-char is: $md5_char;;;;;;";echo "salt-char is: $salt_char";?>

原文:

http://www.jb51.net/article/98261.htm

http://www.cnblogs.com/Venom/p/5484218.html

原创粉丝点击