How to Check SHA512 Checksum on Mac
SHA512 hashes are often used to determine data integrity, whether for matching a downloaded file to an original on a server, or for command output, or to make sure a file transfer was successful, or not tampered with.
Checking a SHA512 hash is pretty easy on a Mac, thanks to bundled command line tools that are preinstalled on any semi-modern MacOS installation. We’ll cover two different methods to check and verify SHA512 hash on the Mac, using both the shasum command, and openssl command.
How to Check & Verify SHA512 checksum with shasum
MacOS includes the shasum command, which makes checking sha512 checksum hashes super easy.
- Open the Terminal, from /Applications/Utilities/
- Type the following command, replacing /path/to/file with the path to the file you want to check the hash for:
- Hit return, the SHA512 hash will be reported in the terminal output
shasum -a 512 /path/to/file
For example, if you’re checking the sha512 has of a file named “DownloadedFile.zip” in ~/Downloads, the command and output may look like the following:
shasum -a 512 ~/Downloads/DownloadedFile.zip
The long string of alphanumeric characters is the sha512 hash.
How to Check SHA512 Hash with openssl
You can also use the openssl command to verify and check a SHA512 hash checksum, also available to run via the Terminal on a Mac by using the following command string:
openssl sha512 filename
Using the same file example as above, the command and output would look like the following:
~ openssl sha512 ~/Downloads/DownloadedFile.zip
With the long string of text and numbers being the SHA512 hash.
So there you go, now you know two different ways to check and verify SHA512 hashes. While SHA256 is perhaps the most commonly used nowadays, SHA512 is gaining ground, but even the cryptographically weaker SHA1 and md5 also remain in use as methods of verifying file or data integrity for comparisons.
We’re obviously focusing on the Mac here, but you can use the same commands on any other device with a unix or linux base or subsystem, including Linux or even Windows with WSL (Linux Bash shell). Happy hashing.