Rules analysis of WordPress user password algorithm

Source: Internet
Author: User
Keywords Rules passwords WordPress Algorithms

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

The user password for the wordpress system is stored in the wp_users6184.html "> Datasheet user_pass field, the password is generated by portable PHP Password hashing Framework class, The form of the password is random and irreversible, the same plaintext password at different times, the resulting ciphertext is not the same, relatively safe.

WordPress User Password generation process is, when the need to generate user passwords, a random production of a salt, and then add salt and password, and then count MD5, and finally and encode64 of the hash value added, you get a $p$ The beginning of the password, this password every time the results are different, the following is the code to generate the WordPress password, put it in the WordPress root directory, you can generate an encrypted password, with this password to replace the Wp_users datasheet user_ Pass field to modify the password.

$password = ' abc ';

Global $WP _hasher;

if (Empty ($wp _hasher)) {

Require_once ('./wp-includes/class-phpass.php ');

$WP _hasher = new PasswordHash (8, TRUE);

}

echo $wp _hasher->hashpassword ($password);

?>

However, there is a more simple way to modify the WordPress user password, that is, directly to the Wp_users Datasheet user_pass field modified to 32-bit MD5 (PASSOWRD) can modify the password for password, the form of the password is of course not very safe, so, When the user logs on to WordPress, the system automatically modifies the MD5 password to the password that begins with $p$.

WordPress's support for simple MD5 passwords makes it easier for users of other systems, such as ucenter systems, to integrate WordPress.

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.