When discuz is registered, the password is encrypted according to one rule.
For example, if my password is 123456
Copy codeThe Code is as follows:
Echo md5 ("123456 ");
Output:
Copy codeThe Code is as follows:
E10adc3949ba59abbe56e057f20f883e
The database value is:
Copy codeThe Code is as follows:
7839dc9437013b5c11a5d86e9b8350e9
Note:
There is a field named salt whose value is d82a35.
In fact, this is a random string.
The value after the first md5 plus the salt value (salt) and then md5 is the value to be obtained.
Try it
Copy codeThe Code is as follows:
Echo md5 (md5 ('200'). 'd82a35 ');
The result is 7839dc9437013b5c11a5d86e9b8350e9, which is correct.
In versions earlier than php5.5, there is no good encryption mechanism. This is a good method. The password security has been greatly enhanced.
Php5.5 provides more reliable and convenient encryption methods. For more information, see:
Password_hash ()
Http://www.php.net/manual/zh/function.password-hash.php