Once you have downloaded a file from the internet, it is always nice to check the integrity of the file to ensure that it contains what it is meant to contain. No more and no less.
That is the purpose of
md5.
A hash (a long number) is created from the code that comprises the program that you want to download. It can also be referred to as a key or a hash key.
That hash is created by using a program that manipulates the code through specific steps. Those steps are called an algorithm. And the hash is posted on or near the place where the program is downloaded from the server. Not all programs have md5 sums, but if one does, it is nice to be able to know how to use it.
After the program is on your computer, you create a hash using a program that takes the new unopened, unexecuted download through the same steps (algorithm) that the creator (or support staff) did at the server end. The program I use on Windows is md5sums.
http://www.pc-tools.net/win32/md5sums/It is a zipped file. I will write a tutorial on unzipping files.
The program md5sums works by creating a hash for any program whose icon is dragged over the md5sums icon.
For example:
I download ruby. I save it in my downloads file in a new folder called ruby. Before I open the ruby download, I want to make sure the program is intact. So I check it with md5sums.
I copy the md5sums.exe file from it's home in the md5sums folder in downloads. Then I paste it in the ruby folder under the ruby186-26.exe file. Then I drag the ruby186-26.exe file over the md5sums.exe icon. A command line window will appear. Don't be frightened, you don't have to do anything except read the numbers. On the ride side of the screen there will be a long number, like this:
4d512cea917dd1cf010aaab2e6d286be
(note: this is not the hash for ruby186-26.exe)
and that is the md5 key. Compare the number in the terminal window to the number on the site for the program you downloaded.
If the two hashs match, your download is intact and you can unpack and execute according to instructions.
If the hashs do not match, do not use the program. If you are inclined, contact the providers of said program and inform them that your hash did not match theirs. You may decide to include your hash for their reference.
You close the terminal window that calculated the hash by pressing ENTER as the instructions suggest or by clicking the "X" in the top right corner of the window.
I hope this helps you to understand the meaning and use of md5.