# 3 Wrong Ways to Store a Password

DevFeed: [3 Wrong Ways to Store a Password](<https://devfeed.tech/articles/3-wrong-ways-to-store-a-password-32089.md>)

Original publisher: [Read original article](<https://adambard.com/blog/3-wrong-ways-to-store-a-password/>)

Published: 2013-07-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Bard](<https://devfeed.tech/sources/adam-bard.md>)

Topics: [passwords](<https://devfeed.tech/topics/passwords.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [hashing](<https://devfeed.tech/topics/hashing.md>), [PHP](<https://devfeed.tech/topics/php.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [authentication](<https://devfeed.tech/tags/authentication.md>), [database](<https://devfeed.tech/tags/database.md>), [hashing](<https://devfeed.tech/tags/hashing.md>), [password](<https://devfeed.tech/tags/password.md>), [passwords](<https://devfeed.tech/tags/passwords.md>), [php](<https://devfeed.tech/tags/php.md>), [salt](<https://devfeed.tech/tags/salt.md>), [sha256](<https://devfeed.tech/tags/sha256.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

## AI overview

This tutorial explains common unsafe password-storage approaches, including plaintext storage, unsalted hashing, and fast hashing with a salt. It describes how database compromise, dictionary attacks, and rainbow tables can expose passwords, and introduces safer password-storage practices without fully detailing them in the supplied excerpts.

## Source excerpt

Sooner or later, in the field of Web Development, you're going to need to store someone's password. This is easy to get wrong, but easy to get right, too. Today, let's take a tour of the wrong ways, and then find out how to do it the (current) right way. Plaintext Alice just learned PHP, and are making an app with user authentication. Her database stores an email and password in a table called users.