3 ms·
You append the salt to the hash, and then re-hash it. Not exactly pretty, but it works.
by willismichael 12y ago
You append the salt to the hash, and then re-hash it. Not exactly pretty, but it works.
- randunel 12y agoHis example doesn't rehash. His example adds the pepper to the initial salt. This is an honest question, how does one apply it retroactively?
- nemanja 12y agoI think you are spot on - you can't apply it retroactively in this case. If you set it up as H(H(pwd, salt), pepper), you could apply pepper retroactively, but that's not what's proposed here nor in the SO question linked above. Also if you do H(H(pwd, salt), pepper), you can successively apply new peppers and make it a bit more maintainable, but I am unclear that it is secure to do so.