wp_hash_password create a different hash everytime


I’ve already seen this topic: wp_hash_password unexpected behaviour

And the problem is similar.
I’m creating an API system where api_key and api_secret are the same as username and user_pwd. The problem is that, of course, i can’t know the user password, so it will be the same encrypted password from the DB.

The user will put his password, so i need to encrypt it in the same way as wordpress and compare it to the password/key in the DB.

But from what i’ve seen, everytime i use wp_hash_password(password) i get a different hash. So how wordpress can compare the hash with the one in the DB? How can i get the same hash to compare it?

Thank you in advance.

, Kryuko 8 months 0 Answers 48 views 0

Leave an answer