I need to integrate a Django system with a WordPress site, as in wordpress users should be able to log in the DJnago part and vice versa,
For this I need to understand how the password hashing works in WordPress. I can see the wp_users
table which stores the username and password hashes.
Looking through the wordpress code, I can see the password is set via wp_set_password, which is using hash_password to hash the password.
Now I dont know enough PHP to understand how it is working. I need to replicate the same in python so I can validate the password from Django part.
There is a comment in the implementation saying:
The hashing framework used is phpass, and its page links to a Python implementation. Here’s the link (.tar.gz). That page has some other useful links (such as a Perl implementation).
Just to add on, the following is a comment snippet from WordPress 3.1’s “wp-includespluggable.php”: