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

  • By
    Create Namespaced Classes with MooTools

    MooTools has always gotten a bit of grief for not inherently using and standardizing namespaced-based JavaScript classes like the Dojo Toolkit does.  Many developers create their classes as globals which is generally frowned up.  I mostly disagree with that stance, but each to their own.  In any event...

  • By
    I’m an Impostor

    This is the hardest thing I've ever had to write, much less admit to myself.  I've written resignation letters from jobs I've loved, I've ended relationships, I've failed at a host of tasks, and let myself down in my life.  All of those feelings were very...

Incredible Demos

  • By
    WordPress-Style Comment Controls Using MooTools or jQuery

    WordPress has a nice little effect on the Admin Dashboard where it shows and hides the comment control links when you mouseover and mouseout of the record's container. Here's how to achieve that effect using MooTools or jQuery. The XHTML Notice that we place the links into...

  • By
    Drag & Drop Elements to the Trash with MooTools 1.2

    Everyone loves dragging garbage files from their desktop into their trash can. There's a certain amount of irony in doing something on your computer that you also do in real life. It's also a quick way to get rid of things. That's...

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!