How to Store Passwords Safely

How to Store Passwords Safely

Why plain text and fast hashes fail, and how salts and bcrypt protect your users

What you'll learn

  • Why plain text and encryption aren't enough
  • How hashing lets you check a password without storing it
  • What salts are and why every user needs one
  • Slow hashes like bcrypt and Argon2, and work factors

In this video, we'll look at what an attacker gets when your users table leaks, and how the way you store passwords decides the damage. We'll go from plain text to encryption to hashing, and see why simple unsalted hashes are cracked so quickly.

We'll cover salts, why fast hashes like SHA-256 fall to graphics cards, and how slow hashes like bcrypt and Argon2 make every guess expensive. We'll also see the few lines of code it takes, and how to raise the work factor over time.

By the end, you'll know exactly how to store passwords so a leak doesn't become a disaster.

More videos

30 short explainers so far, with more on the way

View all videos

Join the Community

roadmap.sh is among the top 10 most starred projects on GitHub and is visited by hundreds of thousands of developers every month.

Top 10 out of 28M!

371K

GitHub Stars

Star us on GitHub
Help us reach #1

+90kevery month

+3.2M

Registered Users

Register yourself
Commit to your growth

+2kevery month

52K

Discord Members

Join on Discord
Join the community

RoadmapsGuidesFAQsYouTube

roadmap.shby@nilbuild

Community created roadmaps, best practices, projects, articles, resources and journeys to help you choose your path and grow in your career.

© roadmap.sh·Terms·Privacy·

ThewNewStack

The top DevOps resource for Kubernetes, cloud-native computing, and large-scale development and deployment.