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
    Vibration API

    Many of the new APIs provided to us by browser vendors are more targeted toward the mobile user than the desktop user.  One of those simple APIs the Vibration API.  The Vibration API allows developers to direct the device, using JavaScript, to vibrate in...

  • By
    Being a Dev Dad

    I get asked loads of questions every day but I'm always surprised that they're rarely questions about code or even tech -- many of the questions I get are more about non-dev stuff like what my office is like, what software I use, and oftentimes...

Incredible Demos

  • By
    Using Dotter for Form Submissions

    One of the plugins I'm most proud of is Dotter. Dotter allows you to create the typical "Loading..." text without using animated images. I'm often asked what a sample usage of Dotter would be; form submission create the perfect situation. The following...

  • By
    Vertically Centering with Flexbox

    Vertically centering sibling child contents is a task we've long needed on the web but has always seemed way more difficult than it should be.  We initially used tables to accomplish the task, then moved on to CSS and JavaScript tricks because table layout was horribly...

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!