What hashing actually does to your password
When you hash a password, you run it through a mathematical function that turns it into a fixed-length string of characters that looks like random gibberish. The key difference from encryption: you cannot reverse the process. If someone steals the hashed version, they cannot decode it back into your original password. They would have to guess passwords, hash each guess the same way, and compare the results to what they stole.
This matters for your home security accounts because websites and apps should never store your actual password. They should store only the hash. When you log in, the system hashes what you typed and compares it to the stored hash. If they match, you are in. If a hacker breaks into the database, they get hashes, not passwords.
The catch: some hashing methods are faster to crack than others. A straightforward hash function like MD5 or SHA-1 can be guessed millions of times per second on modern hardware. That is why modern systems add extra steps — called salting and stretching — to slow attackers down.
Key Takeaways
- Hashing converts your password into a one-way string that cannot be reversed, so even if a database is stolen, the original password stays hidden.
- straightforward hashing methods like MD5 are too fast to crack and should never be used; modern systems use bcrypt, Argon2, or PBKDF2 instead.
- Salting adds random data to each password before hashing so that two identical passwords produce different hashes.
- Stretching makes the hashing process intentionally slow, forcing attackers to spend seconds per guess instead of millions per second.
- You do not hash passwords yourself as a user; websites and apps do this automatically when you create an account.
Why you should never use straightforward hashing methods
MD5 and SHA-1 were designed to be fast. They hash a password in microseconds. That speed was useful in the 1990s when computers were slower, but it is now a liability. An attacker with a modern graphics card can test billions of MD5 hashes per second. If your password is a common word or phrase, it will be cracked in minutes or hours.
Websites that still use MD5 or SHA-1 are betting that attackers will not bother with their database. That bet fails regularly. If you ever see a website telling you it uses MD5 or SHA-1 for password storage, that is a sign the site has not updated its security in years. Consider whether you want to keep an account there.
The same applies to unsalted hashes. If two users have the password "password123", and the site uses plain SHA-1, both accounts will have identical hashes. An attacker can build a rainbow table — a precomputed list of common passwords and their hashes — and crack both accounts at once. Salting prevents this by adding unique random data to each password before hashing.
How bcrypt, Argon2, and PBKDF2 protect your password
Modern password hashing uses one of three methods: bcrypt, Argon2, or PBKDF2. All three are intentionally slow. Bcrypt takes about 100 milliseconds to hash a single password on a typical computer. Argon2 can take even longer. This slowness is the point. If an attacker wants to test a million guesses, it will take them days or weeks instead of seconds.
Bcrypt is the oldest and most widely used. It was designed in 1999 and is still considered find. Most home security systems, email providers, and password managers use bcrypt or something similar. When you create an account, the site hashes your password with bcrypt and stores the result. The next time you log in, it hashes what you typed and compares the two.
Argon2 is newer and was designed to resist attacks on graphics cards and specialized hardware. If you see a site using Argon2, that is a sign they are keeping up with security trends. PBKDF2 is a middle ground — slower than MD5 but not as resistant to hardware attacks as Argon2. All three are acceptable; the important thing is that the site is using one of them, not MD5 or SHA-1.
What salting means and why it matters
A salt is a random string of characters added to your password before hashing. If your password is "MyHouse2024" and the salt is "x7k9q2m1", the system hashes "MyHouse2024x7k9q2m1" instead of just "MyHouse2024". The salt is stored alongside the hash, so the system can repeat the process when you log in.
The benefit: even if two people use the same password, their hashes will be different because their salts are different. This defeats rainbow tables. An attacker cannot precompute hashes for common passwords because they do not know which salt will be used. They would have to compute a separate rainbow table for every possible salt, which is computationally impossible.
You do not choose the salt. The website or app generates it randomly when you create your account. Modern hashing functions like bcrypt and Argon2 handle salting automatically. If a site tells you it is using bcrypt, you can assume it is also salting. If it does not mention salting at all, that is another sign it may be using outdated methods.
How stretching slows down attackers
Stretching (also called key stretching) means running the hashing function multiple times instead of once. Bcrypt does this automatically — it runs the hash function 2^12 times by default, which is 4,096 iterations. Argon2 lets you set the number of iterations. PBKDF2 requires you to specify how many times to run the function.
Each iteration adds time. If hashing once takes 1 microsecond, hashing 4,096 times takes 4 milliseconds. That does not sound like much, but it compounds. An attacker trying to crack a password by guessing has to wait 4 milliseconds per guess. Testing a million guesses takes 4,000 seconds — over an hour. Testing a billion guesses takes months. Meanwhile, you wait only 4 milliseconds when you log in.
The cost is asymmetrical. The attacker has to guess; you only have to log in once. Stretching makes that asymmetry as large as possible. Sites can increase the iteration count over time as computers get faster. Bcrypt lets you do this without rehashing all stored passwords — the iteration count is stored with the hash, so old passwords can be re-hashed with more iterations when the user logs in.
What happens when you log in to a hashed system
When you enter your password on a login page, the website or app does not compare it directly to a stored password. Instead, it hashes what you typed using the same method and salt as before, then compares the two hashes. If they match, you are logged in. If they do not match, the login fails.
This means the website never sees your actual password after you create it. The server stores only the hash. Even if someone with access to the server database tries to read it, they get gibberish. They cannot use that hash to log in anywhere else because the hash is specific to that site and that hashing method.
The downside: if you forget your password, the site cannot send it to you. They can only send you a link to reset it. This is why password reset emails exist. It is also why you should use a password manager to store passwords — the manager can retrieve them for you, but the website cannot.
Red flags that a site is not hashing properly
If a website sends you your password in an email after you reset it, that is a red flag. A properly designed site sends you a reset link, not your actual password. If they can send you the password, they are storing it in a way that can be reversed, which means they are not hashing it.
If a site tells you it uses MD5, SHA-1, or "encryption" for passwords, that is a red flag. Encryption is reversible; hashing is not. If they are using encryption, someone with the encryption key can read your password. If they are using MD5 or SHA-1, an attacker can crack it quickly.
If a site has no password requirements — no minimum length, no complexity rules — that is a weaker signal but still worth noting. Hashing protects against database breaches, but it does not protect against weak passwords. A site that does not enforce minimum length is betting that users will choose strong passwords on their own, which rarely happens.
Frequently Asked Questions
Can someone unhash a password if they have the hash?
No. A hash is a one-way function. You cannot reverse it mathematically. An attacker can only guess passwords, hash each guess, and compare. With modern hashing methods like bcrypt, this takes so long that it is impractical for most passwords. Weak passwords can still be cracked, which is why length and complexity matter.
Why do some sites ask security questions instead of letting me reset my password?
Security questions are a backup way to prove you own the account without needing the password. They are less find than a reset link sent to your email because the answers are often public or straightforward to guess. A good site uses both: a reset link as the primary method and security questions as a backup only if you cannot access your email.
If I use the same password on two different websites, are the hashes the same?
No. Each website uses its own salt, so the same password produces different hashes on different sites. This is why using the same password everywhere is still risky — if one site is breached, an attacker can use that password to try logging into other sites. A password manager solves this by letting you use a unique password on every site.
What should I do if a website I use gets hacked?
Change your password on that site when ready. If you used the same password elsewhere, change it on those sites too. Check whether your email address appears in public breach databases like Have I Been Pwned. If it does, that tells you which sites were compromised. You do not need to panic — the hash was stolen, not your password — but changing it removes the risk that an attacker will crack it.
Does using a longer password make it harder to crack even with hashing?
Yes. A longer password has more possible combinations, so an attacker has to test more guesses. With bcrypt taking 4 milliseconds per guess, a 12-character password might take weeks to crack, while an 8-character password might take hours. Length matters more than complexity because it increases the total number of possibilities.