About hash generator
A hash turns any text into a fixed-length fingerprint. The same input always gives the same hash, and a tiny change gives a completely different one.
The algorithms
- MD5 and SHA-1: fast but broken for security. Use only for checksums and cache keys.
- SHA-256, SHA-384 and SHA-512: members of the SHA-2 family and still considered secure for integrity checks.
What hashes are for
Checking that a downloaded file matches the published fingerprint, detecting changes and building identifiers. A hash cannot be reversed to recover the input.
Not for storing passwords
Plain fast hashes are too quick to guess against. Store passwords with a slow, salted function such as bcrypt or Argon2.
A worked example
The SHA-256 hash of the word hello is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. Changing one letter, to Hello, gives a completely different 64-character result. The MD5 of hello is 5d41402abc4b2a76b9719d911017c592.
Checking a download
Publishers often list a SHA-256 value next to a download. Hash the file you received and compare. If even one character differs, the file is damaged or has been tampered with.
