Home > Article > Backend Development > A brief discussion on discuz password encryption method_PHP tutorial
When discuz registers, the password will be encrypted according to a rule.
For example, my password is 123456
will output:
The value in the database is:
NOTE:
There is a field called salt, its value is: d82a35
Actually 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
This time the result is: 7839dc9437013b5c11a5d86e9b8350e9, which is correct.
In versions prior to php5.5, there was no good encryption mechanism. This is a good way to go. Password security has been greatly enhanced.
There is a more reliable and convenient encryption method in php5.5. Friends who like to delve deeper can find out:
password_hash()
http://www.php.net/manual/zh/function.password-hash.php