discuz password encryption method_PHP tutorial

WBOY
Release: 2016-07-13 10:29:30
Original
853 people have browsed it

The discuz password encryption method is recorded here.

When discuz registers, the password will be encrypted according to a rule.
For example, my password is 123456
echo md5("123456");

will output:
e10adc3949ba59abbe56e057f20f883e

The value in the database is:
7839dc9437013b5c11a5d86e9b8350e9

Note:
There is a field called salt, its 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.
Test: www.jbxue.com
echo md5(md5('123456').'d82a35');

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.

Extension:
password_hash()
http://www.php.net/manual/zh/function.password-hash.php

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/775950.htmlTechArticlediscuz password encryption method is recorded here. When discuz registers, the password will be encrypted according to a rule. For example, my password is 123456 echo md5("123456"); will output: e10adc3949ba59abbe...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template