Difficulty: Intermediate
Why do we add 'salt' to passwords before hashing?
To ensure that two users with the same password have different hashes, and to protect against pre-computed 'Rainbow Table' attacks.
Hashing, Rainbow Tables
JavaScript is required for the interactive version of this page, including the code playground and progress tracking. Browse all InternHack tutorials.