A practical explainer on what auth libraries do under the hood when handling passwords. Covers the difference between hashing and encryption, why plain hashes are insufficient due to rainbow tables and hash collisions, how salting solves those problems, and why bcrypt's deliberately slow cost factor matters for brute-force resistance. Breaks down the anatomy of a bcrypt hash string, showing how the algorithm version, cost factor, salt, and hash are all encoded together in one value.

8m read timeFrom freecodecamp.org
Post cover image
Table of contents
PrerequisitesTable of ContentsHashing vs EncryptionWhy a Plain Hash Isn't EnoughEnter SaltingWhy bcrypt Is Slow (and Why That's the Point)What's Actually in Your DatabaseWrapping Up

Sort: