0

I got a problem with a password-hash saved in a database. This value is hashed in PHP with password_hash

password_hash($password, PASSWORD_DEFAULT, $options);

where options is 'cost' => 11

Now i am programming a node-API for an iOS/Android-App and I am using bcrypt for handling the comparison with the compareSync-method.

For my unterstanding, there are two parameters at the method: the plain-text and the hash-value?

the hash-value starts with: $2y$ - maybe there is the problem?

If I compare the plaintext-value with the hash, I get false back.

Please help me, am I doing everything right?

Thank you for your helpful answers!

Bernhard Miehl
  • 346
  • 1
  • 5
  • 15

0 Answers0