A hash cannot be decrypted. If a site offers to “decrypt” or “recover” a password you stored there, it was not hashing it — it was either storing it in plain text or encrypting it, and both are worse.

Encryption is a locked box: the right key opens it. A hash is a fingerprint: you can check whether two things are the same, and you can never get the original back.

The difference, in a table

Hash Encryption
Reversible No Yes, with the key
Needs a key No Yes
Output length Fixed (e.g. 256 bits) Same as the input
Purpose Integrity, verification Confidentiality
Change one byte Entire output changes One block changes
Typical use Passwords, file checksums Messages, disks, connections

What each one is for

Encryption protects data you need to read again: a message, a database column, a laptop disk. AES-256 is the standard choice, and the hard part is never the algorithm — it is key management.

Hashing proves that something has not changed, or that a secret matches without storing the secret. A file checksum, a Git commit id and a stored password are all the same idea.

Base64 is neither. It is an encoding: reversible by anyone, with no key, designed to move binary data through text channels. If you can decode it with a tool and no secret, it was never protecting anything.

The algorithms

Algorithm Output Status
MD5 128 bits Broken for security — collisions are trivial
SHA-1 160 bits Broken — collisions demonstrated in 2017
SHA-256 256 bits Fine for checksums and signatures
SHA-512 512 bits Fine, slower than needed in most cases
bcrypt 60 chars Designed for passwords
Argon2 Variable Current recommendation for passwords

The counterintuitive part: SHA-256 is the wrong choice for passwords, not because it is weak but because it is fast. A GPU can compute billions of SHA-256 hashes per second, which is exactly what an attacker wants. bcrypt and Argon2 are deliberately slow and memory-hungry, so each guess costs real time.

That is why the hash generator is the right tool for a checksum and the wrong one for a password. Passwords belong in the password generator and the strength checker.

Reading breach notices

When a company says passwords were “hashed and salted”, ask which algorithm. MD5 and SHA-1 with a salt are still broken at modern speeds. bcrypt or Argon2 means the attackers have a real problem.

When it says “encrypted”, ask who holds the key. If the company can decrypt your password, so can anyone who compromises the company.

A hash is a one-way street with a very distinctive pavement. That is all it needs to be.

Hero photo: Coding Programming, CC0, via Openverse (StockSnap).