How to checksum

By  on  

Many of us see the term checksum and checksum outputs frequently but don't really take the time to run them -- oftentimes we simply trust the file we've downloaded is in working order and from the original source.  This past weekend when I was attempting to recover my Bitcoin Cash, however, I wasn't willing to chance it -- I wanted to ensure the app/file hadn't been compromised in any way.

For those who don't know what a checksum is, I think this definition from Lifewire is helpful:

A checksum is the outcome of running an algorithm, called a cryptographic hash function, on a piece of data, usually a single file. Comparing the checksum that you generate from your version of the file, with the one provided by the source of the file, helps ensure that your copy of the file is genuine and error free.

Armed with the file I wanted, and the verified checksum provided by the author, I ran a checksum on the file in question:

shasum 1 logo.png

# shasum: 1:
# e78c5ca49b926a15b3d4e5107f3b17b2cc6fd54b  logo.png

shasum is Mac's command line command for checking checkums.  The first argument represents which sha hash value you want to use (sha-1, sha-256, etc.) . The last argument is the file to check.

When it comes to financial and critical apps and files, it's probably worth your time to run a quick checksum to ensure what you've downloaded is what you really want!

Recent Features

Incredible Demos

  • By
    Create a Brilliant Sprited, CSS-Powered Firefox Animation

    Mozilla recently formally announced Firefox OS and its partners at Mobile World Congress and I couldn't be more excited.  Firefox OS is going to change the lives of people in developing countries, hopefully making a name for itself in the US as well.  The...

  • By
    MooTools 1.3 Browser Object

    MooTools 1.3 was just released and one of the big additions is the Browser object.  The Browser object is very helpful in that not only do you get information about browser type and browser versions, you can gain information about the user's OS, browser plugins, and...

Discussion

  1. Thanks for that. I hadn’t had to do it on the Mac side yet but on Windows the equivalent built-in utility is called CertUtil.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!