Securely hash passwords - so much conflicting advice!

前端 未结 5 1925
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-02 23:39

I\'m reading so much conflicting advice as to how to store passwords securely. All I know for sure is not to use MD5! I\'ve seen people advocate using PHP\'s bcrypt

5条回答
  •  一生所求
    2021-01-02 23:55

    You can use sha256. A good thing to do is to add extra information to the password such as username, userid, or some other data to it. This way, if someone hack your database, it will be impossible to use an existant hash database to find the password. They will have to crack the password starting from zero.

提交回复
热议问题