How would you add salt to your existing password hashes?

前端 未结 8 1706
心在旅途
心在旅途 2021-02-08 06:08

I have a database of hashed passwords that had no salt added before they were hashed. I want to add salt to new passwords. Obviously I can\'t re-hash the existing ones.

<
8条回答
  •  时光取名叫无心
    2021-02-08 06:43

    The best way I store my salt is that I embed the salt value within the password hash + salt I have just created. I don't append the salt string to the beginning or end of the hash, I literally embed the salt into the hash.

提交回复
热议问题