Sometimes when you download third-party apps, usually dmg files, from internet, you may find the SHA256 along with the direct download link. It is a very long string of alphabets and numbers, such as 16684a03a6e6564e0962636735ce7d9bf11483f6d194b05729981136cced9eb, just as an example. SHA stands for Secure Hash Algorithm. Its name gives away its purpose. SHA is for cryptographic security. We can verify our files’s integrity by comparing the SHA hashes. The file checksum integrity verifier tool is built-in to the Mac OS. We can find out the cryptographic hashes for download apps, DMG and other files.
Go to Launchpad > Other > Terminal. We use a single command line in the Terminal to find out the file hash. Just type in “shasum -a 256” without the quotes, followed by a space, then find the DMG file in Finder, drag and drop it from Finder to Terminal. After that you will see its full path in the Terminal window. Note that there is a space between the command and the file path. After that, press Return on Enter key on your keyboard to execute the command and calculate the SHA256 for DMG file on Mac.