admin管理员组

文章数量:1391947

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.

本文标签: passwordwphashpassword create a different hash everytime