Open the archive
Open the downloaded archive in Peek.
How-to · Peek Pro
A download page publishes a checksum so you can confirm that the file you received is the file they published. Checking it means calculating the checksum of your copy and comparing the two, character by character.
With Peek
Checksums are part of Peek Pro, which you can try free for 14 days. The Terminal way below is free and built into macOS.
Open the downloaded archive in Peek.
Choose Archive ▸ Checksums…. Peek calculates SHA-256, SHA-512, SHA-1 and MD5.
Paste the checksum from the download page. Peek recognises which kind it is and says whether it matches.
Choose a file such as SHA256SUMS or archive.zip.sha256, and Peek finds the line for your file.
The same works for a file inside the archive, without extracting it first.
From the Terminal
No install needed.
# Calculate the SHA-256 of a file
shasum -a 256 download.zip
# Compare with a published value
echo "<published-checksum> download.zip" | shasum -a 256 -c
# Check every file listed in a SHA256SUMS file
shasum -a 256 -c SHA256SUMS
# Other algorithms
shasum -a 512 download.zip
md5 download.zip
Note the two spaces between the checksum and the file name in the echo line; with one, shasum -c reports a format error.
Questions
It means your copy is identical to the one the checksum was made from. It says nothing about whether that original is trustworthy, and a checksum published on the same page as a tampered file can be tampered with too.
Only to compare with a value someone published in that form. They detect accidental corruption but are not safe against deliberate tampering. Prefer SHA-256 or SHA-512 when you have the choice.
Usually an incomplete download, or a different release than the one the checksum belongs to. Download again and compare the file names and versions.
From the Terminal, unzip -p archive.zip path/to/file | shasum -a 256. In Peek Pro, Checksums works on a file inside the archive.
More how-to guides
Free to download
Peek is a native Mac app from the Mac App Store. Nothing is charged when the trial ends; Peek Pro is a one-time purchase, with no subscription and no account.