# What is a hash function?

A hash function turns any amount of data into a short, fixed-length fingerprint, such as the 256-bit output of SHA-256. The same input always gives the same hash, a tiny change gives a completely different one, and nobody can work back from the hash to the input or find two inputs with the same hash. That makes hashes useful for checking that a download or a backup has not changed, for digital signatures, which sign the hash of a document, for storing passwords safely, and for the integrity checks inside TLS. Old functions have failed: MD5 and SHA-1 are broken for security purposes, and a public SHA-1 collision was demonstrated in 2017, so treat them as legacy wherever they still appear, for example in old certificates or file checks. SHA-256, SHA-384 and SHA-3 are current choices. A hash is not encryption: there is no key and nothing to decrypt. Quantum computers weaken hash functions only modestly.

FAQ: [Encryption and encrypted traffic](https://netsenx.com/en/faq/encryption) · https://netsenx.com/en/faq/what-is-a-hash-function

## Read next

- https://netsenx.com/en/encrypted-traffic-analysis
- https://netsenx.com/en/what-is-ndr

## Related questions

- [Is hashing the same as encryption for passwords?](https://netsenx.com/en/faq/is-hashing-the-same-as-encryption-for-passwords)
- [What is a digital signature?](https://netsenx.com/en/faq/what-is-a-digital-signature)
- [What is a TLS certificate?](https://netsenx.com/en/faq/what-is-a-tls-certificate)
- [What happens when a TLS certificate expires?](https://netsenx.com/en/faq/what-happens-when-a-tls-certificate-expires)
- [Why are TLS certificate lifetimes getting shorter?](https://netsenx.com/en/faq/why-are-tls-certificate-lifetimes-getting-shorter)
