discuz密码加密方式
discuz密码加密的方式,记录在此。
discuz注册时,会把密码按一个规则加密。
比如我的密码是123456
echo md5("123456");
会输出:
e10adc3949ba59abbe56e057f20f883e
而数据库的值却为:
7839dc9437013b5c11a5d86e9b8350e9
注意到:
有个叫salt的字段,其值为:d82a35
其实这是一个随机的字符串。
第一次md5后的值再加上盐值(salt)再进行md5,就是要得到的值了。
测试:www.jbxue.com
echo md5(md5('123456').'d82a35');
这回结果是:7839dc9437013b5c11a5d86e9b8350e9,是对的。
在php5.5之前的版本,并没有很好的加密机制。这是个不错的方式。已经大大地加强了密码的安全性了。
而php5.5中有更为可靠和方便的加密方式。
延伸:
password_hash()
http://www.php.net/manual/zh/function.password-hash.php

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics









