What Is Hashing? One-Way Functions Explained
Hashing turns any data into a fixed-length fingerprint that can't be reversed. Change one character of the input and the hash changes completely — which is exactly what makes it perfect for verifying integrity and safely storing passwords.
Key properties
- One-way — you can't get the original data back from the hash.
- Deterministic — the same input always produces the same hash.
- Avalanche effect — a tiny input change produces a totally different hash.
- Fixed length — SHA-256 always outputs 256 bits regardless of input size.
Where it's used
Verifying a downloaded file wasn't tampered with (compare hashes), storing passwords (store the hash, never the password — with a salt added), and identifying known malware by file hash in threat intelligence. MD5/SHA-1 are now considered weak; SHA-256 is the standard. Distinct from encryption, which is reversible.
Frequently asked questions
What is hashing used for?
Verifying data integrity, storing passwords safely, and identifying files (including malware) by their unique fingerprint.
Why is hashing irreversible?
Hash functions are one-way by design — they discard information, so the original input can't be reconstructed from the output.
What is the difference between MD5 and SHA-256?
MD5 is older and cryptographically broken; SHA-256 produces a longer, secure hash and is the current standard for integrity and security.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.