Discuz password encryption method

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.