File Hashes Explained: SHA-256, SHA-1 and MD5
Learn what file hashes are useful for, how they verify files and why a hash is not encryption.
A file hash is a fingerprint
A hash function turns file bytes into a fixed-length value. If even one byte changes, the hash will usually change dramatically. That makes hashes useful for comparing copies of the same file.
SHA-256 is a common integrity choice
SHA-256 produces a 256-bit digest and is widely used for integrity checks. When a software publisher provides a SHA-256 value, you can hash your downloaded file and compare the two values.
MD5 and SHA-1 have important security limits
MD5 and SHA-1 are still encountered in legacy checks, but they are not suitable for modern collision-resistant security decisions. They can still be useful as quick non-adversarial checks when that is the format a source provides.
Hashing is not encryption
A hash does not create a reversible protected copy of a file. It is a one-way digest used for comparison and integrity workflows, not a method for hiding the file contents.