When manually downloading files over the internet, its always a good idea to check the integrity of these files.
Making sure no-one has modified them maliciously or just to check they have not become corrupted during the download process.
If you perform downloads with services such as the App Store, then this validation is performed for you automatically but when manually downloading a file from a web site we can perform this task ourselves.
When downloading a file from a website, you may have seen hashes ( a string of hexadecimal numbers) listed next to the downloads. For example this is a download from Line6:
Here are 3 examples that generate hashes using the more common methods, MD5, SHA-1 and SHA-256 , on a file called ‘myFile.dmg’
md5 myFile.dmg or openssl dgst -md5 myFile.dmg
openssl dgst -sha1 myFile.dmg
openssl dgst -sha256 myFile.dmg