Intro to Authentication & Membership Features / Chapter 1 — Fundamentals of Authentication (lessons 1–5) / Lesson 1
Storing Passwords with a Salted Hash
Time needed: about 3 min (estimate)
Reading settings
These settings are remembered on this device only.
You can try the opening of this lesson without an account.
What happens when you store passwords in plain text
Store a password as-is in the database, and the moment the database leaks, every single password leaks with it.
Users often reuse the same password across multiple services, so the damage spreads to other services too.
That's why passwords are stored as a one-way hash (a transformation that can't be reversed), and at login you check by "hashing the input the same way and seeing if it matches the stored hash."
The difference in how it's stored
What salt is actually for
Create a free account to keep reading
With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.
Report a problem with this lesson
Log in to send a report.