What is the difference between hashing and encryption?
Choose the right method for passwords, file integrity, and reversible confidential data.
Hashing creates a one-way digest; encryption creates data that can be reversed with a key. Use password hashing for verification, authenticated encryption for confidential data that must be read later, and SHA-256 checksums for file comparison.
What changed in this update?
Use conditions and incorrect algorithm choices were converted into a decision guide.
Why are passwords not stored with plain SHA-256?
Fast hash functions let an attacker test many password guesses. Password storage needs a unique salt and an adjustable-cost design such as Argon2id, scrypt, bcrypt, or PBKDF2.
Why does encryption need authentication?
Confidentiality alone does not detect modification. Authenticated modes such as AES-GCM or ChaCha20-Poly1305 provide confidentiality and integrity together.
When is a checksum enough?
SHA-256 can compare file integrity against an expected digest from a trusted source. Use a digital signature when publisher identity also needs verification.
Frequently asked questions
Is bcrypt encryption?
No. bcrypt is a non-reversible password hashing function designed for verification.
Can a hash be decrypted?
There is no algorithmic decryption; weak inputs can still be guessed through dictionaries or brute force.