# Cryptographic Hash

Canonical URL: https://offlineutils.com/glossary/hash
Also known as: Hash function, Digest, Message digest, Checksum
Published: 2026-06-24
Publisher: offlineutils.com

> A cryptographic hash function takes any input and produces a fixed-length pseudo-random output (the 'digest') that uniquely identifies the input — and is computationally infeasible to reverse, making hashes the foundation of integrity checks, content addressing, and password storage.

Common cryptographic hash functions include SHA-256 (256-bit output), SHA-384, SHA-512, and the legacy SHA-1 and MD5. Two cryptographic properties matter:

1. Preimage resistance: given a hash, it is computationally infeasible to find an input that produces it.
2. Collision resistance: it is computationally infeasible to find two different inputs that hash to the same output.

MD5 and SHA-1 are broken against the second property — practical collision attacks exist — so they are unsafe for any security purpose. SHA-256 is the safe default for general-purpose use.

For password storage, a plain cryptographic hash is not enough. Use a purpose-built password hashing function (Argon2, bcrypt, scrypt) that includes a salt and is deliberately slow.

## Frequently asked questions

### Is hashing the same as encryption?

No. Encryption is reversible with the right key; hashing is intentionally one-way. There is no 'decrypt' for a hash.

### Should I use MD5?

Not for anything security-sensitive. Practical MD5 collision attacks have existed since 2004. Use MD5 only for legacy interoperability or as a non-cryptographic checksum.

### What's a salt?

A salt is a random value added to the input before hashing a password. It prevents attackers from using precomputed rainbow tables and forces them to compute hashes per-user. Always use a unique salt per password.

## Related tools

- https://offlineutils.com/hash-generator
- https://offlineutils.com/password-generator
- https://offlineutils.com/uuid-generator

## References

- https://en.wikipedia.org/wiki/Cryptographic_hash_function
- https://en.wikipedia.org/wiki/SHA-2
