Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Hashing?

Hashing is a one-way process that turns any input into a fixed-length value, or digest, used to verify integrity, store passwords safely, and identify files without revealing the original data.

Illustration for the cybersecurity term Hashing
Home / Blog / Cybersecurity Terms / What Is Hashing?
17 November 2026

What Is Hashing?

What Is Hashing?

Hashing is the process of passing data of any size through a hash function to produce a short, fixed-length output called a hash, digest, or fingerprint. The same input always produces the same hash, but even a one-character change produces a completely different one, and there is no key that turns a hash back into the original data. That makes hashing ideal for checking that something has not changed, and for storing secrets you only ever need to compare.

For example, the SHA-256 hash of a 4 GB disk image is still just 64 hexadecimal characters. If a single bit of the image changes, the hash changes beyond recognition.

What Makes a Hash Function Secure

Not every hash function is suitable for security. Checksums such as CRC32 detect accidental corruption but are trivial to manipulate. A cryptographic hash function must offer:

Common Algorithms and Their Status

AlgorithmOutput sizeStatus
MD5128 bitsBroken; practical collisions since 2004
SHA-1160 bitsBroken; the SHAttered collision was published in 2017
SHA-256 / SHA-512 (SHA-2)256 / 512 bitsSecure and the most widely used
SHA-3224–512 bitsSecure; standardised by NIST as FIPS 202 in 2015
BLAKE2 / BLAKE3VariableSecure and very fast in software

Broken algorithms cause real harm. The Flame espionage malware, discovered in 2012, used an MD5 collision to forge a code-signing certificate that chained to Microsoft, allowing it to spread across local networks by posing as a Windows Update. If MD5 or SHA-1 still underpins signatures or certificates in your environment, replace them.

Where Hashing Is Used

Password Storage Is a Special Case

General-purpose hashes like SHA-256 are designed to be fast, and that is exactly wrong for passwords. A single modern GPU running hashcat can test billions of SHA-256 guesses per second. In 2012 around 6.5 million LinkedIn password hashes, stored as unsalted SHA-1, were posted online and cracked in bulk; in 2016 it emerged that the breach involved far more accounts.

Password hashing needs three things:

  1. A unique salt per password, so identical passwords produce different hashes and precomputed rainbow tables are useless.
  2. A deliberately slow, memory-hard algorithm: Argon2id (winner of the Password Hashing Competition in 2015) is the current first choice in OWASP’s Password Storage Cheat Sheet, with scrypt, bcrypt, and PBKDF2 as alternatives.
  3. Tuned cost parameters that you raise as hardware improves.

A pepper—a secret value held outside the database, for example in a hardware security module—adds protection if only the database is stolen.

Windows shows what happens when hashes are not salted. NTLM hashes can be reused directly in pass-the-hash attacks (MITRE ATT&CK T1550.002), so the hash effectively becomes the password. Weak password storage is a common finding in our web application security services.

Keyed Hashes and HMAC

A plain hash proves data has not changed only if the hash itself comes from a trusted source. To authenticate a message between two parties, use an HMAC (defined in RFC 2104), which combines a secret key with the hash. APIs use HMAC to sign requests and webhooks, and JWTs signed with HS256 rely on HMAC-SHA256. Never build your own construction by simply concatenating a key and a message, as this is vulnerable to length extension attacks with SHA-2.

Hashing Is Not Encryption

Encryption is designed to be reversed by whoever holds the key; hashing is designed never to be reversed. Encoding schemes such as Base64 are neither—they simply change representation and offer no security at all.

FAQ – Frequently Asked Questions

Can a Hash Be Reversed or Decrypted?

Not mathematically, because a hash function discards information and has no key. Attackers instead guess inputs, hash them, and compare the results, using wordlists, rules, and rainbow tables. That works well against short or common passwords and unsalted fast hashes, which is why salted, slow algorithms such as Argon2id or bcrypt are essential for password storage.

Is MD5 Still Safe for Anything?

MD5 should not be used where an attacker could benefit from creating collisions, such as signatures, certificates, or verifying files from untrusted sources. It still appears in non-security roles like deduplication or quick change detection, and in legacy forensic workflows alongside SHA-256. For any new system, choose SHA-256 or another modern algorithm instead.

What Is the Difference Between Salting and Peppering?

A salt is a random value generated for each password and stored alongside its hash. It ensures that two users with the same password get different hashes. A pepper is a single secret value applied to all passwords but stored separately from the database, such as in a hardware security module, so a stolen database alone is not enough to start cracking.

Related Terms

You May Be Interested In These

What Is Mobile Forensics?

Cybersecurity Terms

17 November 2026

What Is Mobile Forensics?

Read More
What Is Identity Lifecycle Management?

Cybersecurity Terms

17 November 2026

What Is Identity Lifecycle Management?

Read More
What Is HSTS?

Cybersecurity Terms

17 November 2026

What Is HSTS?

Read More