About sha hash generator
The SHA family of hash functions turns data into a fixed-size fingerprint. This tool shows SHA-1, SHA-256, SHA-384 and SHA-512 together.
Output sizes
- SHA-1: 160 bits (40 hex characters). Avoid for security.
- SHA-256: 256 bits (64 hex characters).
- SHA-384: 384 bits. SHA-512: 512 bits (128 hex characters).
Verifying downloads
Compare the hash of a downloaded file with the one the publisher lists. If they differ, the file is corrupted or has been changed.
A worked example
Hashing the text abc with SHA-256 gives ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. SHA-512 gives a 128-character result and SHA-1 a 40-character one. All three change completely if you add a single space.
Choosing
- Use SHA-256 for most integrity checks.
- Use SHA-512 when a longer output is required.
- Avoid SHA-1 for anything security-related, because collisions have been demonstrated.
Common mistake
Hashing text with a trailing newline gives a different result from the same text without one. When you compare with another tool, make sure both hashed exactly the same bytes.
