On many sites that offer some type of downloadable file you can often find a very long number sometimes labeled as SHA1Sum.... what is it and how do you use it?
SHA1Sum is basically a hash taken of the file... the hash is not an encryption or anything of that sorts, but what its purpose is to provide a way to generate hash representation of the file. For example, if you have a text file and you take a hash of it, and then change even one comma in that file, the hash that would be produced would be totally different!
This way you can always validate if two files are identical or not.
So how do you do it?
First, download the file (your_file)
Secondly, generate its hash on you system and save it to the hashstring file
sha1sum your_file > hashstring
Then copy the hash of the file from the website that lists it
Finally, use grep to compare the hash that you produced to that from the site (unless you want to compare it one character at the time)
cat hashstring | grep hash_copied_from_site
No comments:
Post a Comment