phpass returns different results

后端 未结 3 1230
南方客
南方客 2021-01-28 22:34

I just put my project from localhost to my host and using the same (phpass) function I receive different results and the length of the returned string is also different. (and ev

相关标签:
3条回答
  • 2021-01-28 23:20

    WARNING: By default the library generates strong system-specific password hashes that are not portable. It means that once created, user database cannot be dumped and exported to another server. This behavior can be changed in config-file as well.

    -> Portable (PHPass) password hashes. Should I use them?

    0 讨论(0)
  • 2021-01-28 23:25

    I finally found out the problem was not phpass itself, but the scripts were causing an error (mysql real name escape was the problem and ajax was actually hiding it from me) anyways, everything is ok now, thanks.

    0 讨论(0)
  • 2021-01-28 23:26

    If I'm not mistaken, phpass uses the best method available to it. In this case, it would seem that the modules available on the live host are not the same as those on localhost, and thus phpass has to choose a different method. The "$2a$" indicates bcrypt, and the "$P$" indicates phpass' internal hash. I.e., it appears that the live host doesn't have bcrypt available.

    0 讨论(0)
提交回复
热议问题