Photo by Maksym Kaharlytskyi on Unsplash

What is a checksum?

bshelling

--

How to verify the checksum of a file and why it’s important

Files of all types are downloaded everyday and every second. From documents to videos, music to applications, etc going from point A to point B. “A” being the source, in most cases a url endpoint that triggers the download process to “B” being the end user’s destination. In many cases if the the file we’re downloading doesn’t come from a familiar source say from a torrent server. How can we verfiy that the file’s integrity? This is where checksums come in?

What is a Checksum?

Basically a checksum is hash value as a result of passing a file through an algorithm, either MD5, SHA-1 or SHA-256. Each algorithm produces different results but it’s recommended that SHA-256 should be used to generate the checksum.

Verifying checksums are useful when files may have been corrupted during network transmission or storage to a hard drive. In practice to validate the integrity of a file the checksum of the original file is needed. If the checksum of the original file is the same as the new file then it’s valid. If not the file may have be altered.

Imagine downloading an application from a site and not verifying it’s checksum. There’s a possibility once you download that application it could really become a disaster. Maybe it would contain some malware…

--

--

bshelling

Shelling is what they call me. A forward thinker debugging life's code line by line. Creator, crossfitter, developer, engineer