From the course: React: Authentication (2021)

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Salting and peppering passwords

Salting and peppering passwords - React.js Tutorial

From the course: React: Authentication (2021)

Salting and peppering passwords

- [Narrator] Okay, the next best practice we're going to talk about is the practice of salting and peppering passwords. Now, these rather humorous terms, refer to a fairly simple but very effective technique for making the password hashes that we store in our database, even more secure. So put simply salting passwords means that before hashing and storing a user's password, we generate a random string of characters and a pen or pre-pen, this random string to the user's password. And we then hash this entire string and store the user's password salt in our database alongside the password hash that we generated. So that's salting, peppering passwords is a very similar process, but instead of randomly generating a unique string for each user as we do with salting, we simply have a secret string that's known only to our server that we append or pre-pend to the password along with the salt before we encrypt it. So in…

Contents