Hashing Fundamentals
A download can look perfectly ordinary and still be incomplete, damaged, or different from the file its publisher intended you to receive. Checking its checksum or cryptographic hash gives you a quick way to compare what arrived with a value published by a source you trust.
The process is straightforward: find the publisher’s reference value, calculate a hash of your local file, and compare the two. This guide walks through each step, explains what a match can—and cannot—tell you, and shows how to respond if the values differ.
A hash function processes a file’s contents and produces a fixed-length value, often displayed as a string of letters and numbers. If even a small part of the file changes, a cryptographic hash such as SHA-256 will usually produce a very different result. You can calculate that value on your device and compare it with the publisher’s reference hash.
This is useful for catching accidental problems: a download that stopped early, a file altered during transfer, or a mismatch between the file you meant to download and the one you saved. The idea belongs to a broader practice called data integrity: checking whether data still matches a known reference.
Hashes have a long-standing role in computing because they turn a potentially large file into a compact value that is easier to compare. They are not encryption, though, and a matching hash does not by itself prove who created a file. For a clearer distinction, see checksums and hashes.
The comparison is only as dependable as the reference value. Look for the checksum or hash on the official download page, in the project’s official documentation, or through another channel the publisher identifies as authentic. Make sure the value refers to the exact file you downloaded and names the algorithm used—often SHA-256.
Some publishers also digitally sign files or publish signed checksum lists. A digital signature can help establish that a value came from a particular publisher, provided you can verify the signing key. A plain hash is a comparison tool; it is not a signature and does not authenticate its source.
Check the filename, file extension, and download location. If the publisher lists several downloads, confirm that you have the right version and operating-system package. A hash for one installer will not match another installer, even if their names are similar.
Next, note the algorithm beside the reference value. SHA-256 is widely used for file checks. If a publisher provides SHA-256, calculate SHA-256 locally; comparing a SHA-256 value with an MD5 or SHA-1 result is not meaningful. These algorithms produce different outputs. For background on the names you may encounter, read SHA-2 and SHA-3 explained.
Older pages may list MD5 or SHA-1. These can help identify accidental changes in some contexts, but they are not recommended when strong protection against deliberate substitution is needed. Prefer a modern algorithm such as SHA-256 when the publisher offers one.
Use a standard command-line utility already available on your system. Replace the example filename with the path to your downloaded file. Keep quotation marks around paths that contain spaces.
Open PowerShell, then run:
Get-FileHash "C:\path\to\your-file.zip" -Algorithm SHA256
The output includes an algorithm and a long value labelled Hash. Check that the algorithm shown is SHA256.
Windows also includes certutil. In Command Prompt, run:
certutil -hashfile "C:\path\to\your-file.zip" SHA256
The hash appears between the command’s status lines. Copy the value carefully, without including surrounding text.
Open Terminal and run:
shasum -a 256 "/path/to/your-file.zip"
The command prints the SHA-256 value followed by the filename.
In a terminal, run:
sha256sum "/path/to/your-file.zip"
On systems where sha256sum is not available, check your distribution’s documentation for an equivalent trusted tool, such as sha256.
Compare your locally calculated value with the publisher’s reference value. A match should be exact: every character must be the same. Letter case is usually not significant for hexadecimal values, but the characters and their order are. Some pages insert spaces or line breaks for readability; ignore those only if they are clearly formatting, not part of the value.
A SHA-256 value is typically shown as 64 hexadecimal characters. If the lengths differ, check that you copied the complete value and selected the same algorithm on both sides.
A mismatch does not automatically mean an attack occurred. It can have ordinary causes, such as a newer release or an incomplete transfer. It does mean you have not confirmed that the file matches the reference you intended to check.
A matching hash shows that the file’s calculated value agrees with the value you compared it against. It does not guarantee that the software is safe, free of bugs, or suitable for your device. Nor does it prove the publisher’s identity if the reference value was obtained from an untrusted source.
Cryptographic hashes are designed to make it extraordinarily difficult to create a different file with the same hash, but the assurance depends on the algorithm and how the reference is distributed. The wider topic of hash collisions explains why algorithm choice matters.
For a high-stakes download, follow the publisher’s full verification guidance. That may include verifying a digital signature, checking a signed manifest, or confirming the release through an additional trusted channel.
File verification is a small habit with a useful payoff: it replaces “the download seemed fine” with a clear comparison you can repeat. To build the foundation behind that check, continue with hashing basics or how hash functions work.