Menu

Tuesday, June 28, 2011

MD5

What is MD5?

Message Digest Algorithm is a command line utility used to check the data integrity of a file where it is downloaded from network.

How to install MD5?

Step 1: Download md5sum.exe file from this site http://etree.org/cgi-bin/counter.cgi/software/md5sum.exe

Step 2: Set the location of this exe file in the Path variable.

Right Click on Computer ---> Properties ---> Advanced System Settings ---> Environment Variables ---> Edit Path Variable ---> Add the location (Ex. C:\softwares\md5 – Location of the md5sum.exe).

Step 3: Go to the command prompt and type md5sum –version. Now the md5 utility is successfully installed.




What does md5checksum will do?
        This utility will generate 128 bit hash value which will be used to check the file corruption.

How to verify the downloaded file is not corrupted in windows?

Step 1: Download a file with its corresponding checksum file (extension with md5) or checksum value.
         Ex: I downloaded commons-io-2.0.1-bin.zip file from http://commons.apache.org/io/download_io.cgi




Step 2: Note down the MD5 value - 32a46d8f3c22ecf2be8217f19bb81282

Step 3: Go to the command prompt and type the following command
            > md5sum file-name
      Ex: > md5sum commons-io-2.0.1-bin.zip

This command generated some value. Check this value with the MD5 value that noted previously. Both values are same so that the file is downloaded without any corruption.