I have tried to convert a text password to hashed password by wp_hash_password() function.But the result password is not same as the password saved in wp_users table
$password = wp_hash_password($password); I have also tried it by md5($password); But generated password the not same as the password saved in wp_users table
The resuling hash is not supposed to be the same. Thats how the hashing was designed, Each stored password has a salt built in.
Wordpress uses Openwalls phpass (http://www.openwall.com/phpass/)
This makes it much more secure if there is a leak of the database as each row has its own salt so attacks are on a per password basis rather than a per database basis increasing the time taken for brute force and dictionary attacks etc.
Wordpress provide a function wp_check_password for checking a password agaist a hash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With