Find the SHA-256 on the original download page before calculating your copy. The reference must belong to the exact filename and build you downloaded.
Calculate the file hash
In Windows PowerShell, replace the path below with your downloaded file’s location. Single quotes and -LiteralPath keep spaces and square brackets in a filename from being interpreted as a pattern.
Get-FileHash -Algorithm SHA256 -LiteralPath 'C:\Downloads\firmware.zip'
Microsoft documents the parameters in Get-FileHash. On macOS, open a terminal in the download folder and run:
shasum -a 256 'firmware.zip'
On Linux with GNU coreutils:
sha256sum 'firmware.zip'
These commands read the file; they do not flash the phone. Here, firmware.zip is an example filename, not a Romzip download.
Read the result
Compare all 64 hexadecimal characters with the published SHA-256. Uppercase and lowercase letters represent the same value. A truncated file or a different build will not have the same digest.
If the values differ, keep the file uninstalled and check both the reference and the download. If the publisher gives no checksum, generating one yourself does not verify the file against that publisher.
A match establishes agreement with the reference bytes. It does not establish device compatibility or make an untrusted download source trustworthy.