How to use sha256 in php5.3.0

后端 未结 5 1809
时光取名叫无心
时光取名叫无心 2021-02-01 01:32

I\'m using sha256 to encrypt the password. I can save the sha256 encrypted password in mysql. But i can\'t login with the same clause.

Insert code:



        
5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-01 01:45

    A way better solution is to just use the excelent compatibility script from Anthony Ferrara:

    https://github.com/ircmaxell/password_compat

    Please, and also, when checking the password, always add a way (preferibly async, so it doesn't impact the check process for timming attacks) to update the hash if needed.

提交回复
热议问题