Thursday, 15 April 2010

php - bcrypt returning wrong calulation -


I'm new to bcrypt This is my test code that Hahed password

  if (! $ ErrName & amp ;;! $ ErrE required mail & amp ;; $ errPassword) { "lib / password. php"; $ Hash = password_hash ($ password, PASSWORD_BCRYPT); // password_compat function if (password_verify ($ password, $ hash)) {$ result = "$ name \ n $ hash \ n $ email"; } Else {echo "did not work"; }}  

When I validate it does have the example does not match the password '1234' $ 2y $ 10 $ Wz / 1MRBMFauEtGdJNeaKq.5INBmig0Nip2urekRON8ekLkYesdj6i and when I daily validate it do I get invalid salt modification

the problem is that PHP library's new "2y" prefix uses a bug in

use this and some other libraries as "2a" native code with prefixes and old There was a need to separate the new, secure code.

Replace 2A with just 2 A


No comments:

Post a Comment