Facebook Twitter Instagram
    Trending
    • Hard Drive Repair After Wrong Voltage Mishap
    • How To Send Excel Workbook As Email Using Button
    • Compare EV Chargers
    • Home Assistant Server Monitoring
    • Mitsubishi Outlander Dash Cam Install
    • Left or Right Pad a String with a VBScript Function
    • List Files in a Folder Using VBScript
    • How to Verify Checksum of a File
    RSS Twitter Instagram Facebook Pinterest YouTube
    Technology Spy
    • Tutorials & Help
    • Reviews
    Technology Spy
    You are at:Home»Security»How to Verify Checksum of a File
    Coding Programming Guides

    How to Verify Checksum of a File

    0
    By Matt on January 18, 2021 Security, Tutorials & Help

    When downloading a file from the Internet it is often suggested that you verify the checksum. The checksum is usually a long list of numbers and characters which can be considered the fingerprint of the file. Verifying that the checksum of your downloaded file matches the checksum listed on the download page ensures it is genuine and intact.

    Calculating the cryptographic checksum of a file in a Windows, Linux and Mac environment is fairly easy. Some might suggest downloading various tools but it is easy enough from the command line using built in features.

    Launch Command Line

    After downloading your file you will need to launch a command line window or terminal.

    Windows
    Press Windows Key+R to open the “Run” box. Type “cmd” and then click “OK”.

    Linux
    Press CTRL-ALT-T

    Mac
    Select Terminal under the Applications > Utilities menu.

    Once you have a command prompt available you should navigate to the location of your downloaded file.

    Calculate Hash under Windows 10

    If you are running Microsoft Windows 10 you can verify the checksum of a file using the command line. To calculate the SHA256 hash of “file” use:

    CertUtil -hashfile C:\path\to\file SHA256

    For the other hash types you can replace SHA256 with the hash name as in these examples:

    CertUtil -hashfile C:\path\to\file MD2
    CertUtil -hashfile C:\path\to\file MD4
    CertUtil -hashfile C:\path\to\file MD5
    CertUtil -hashfile C:\path\to\file SHA1
    CertUtil -hashfile C:\path\to\file SHA256
    CertUtil -hashfile C:\path\to\file SHA384
    CertUtil -hashfile C:\path\to\file SHA512

    Calculate Hash using PowerShell

    If you are familiar with PowerShell then you can run the following command to calculate the SHA256 hash of a file:

    Get-FileHash C:\path\to\file -Algorithm SHA256

    To calculate other hash types you can use:

    Get-FileHash C:\path\to\file -Algorithm SHA1
    Get-FileHash C:\path\to\file -Algorithm SHA256
    Get-FileHash C:\path\to\file -Algorithm SHA384
    Get-FileHash C:\path\to\file -Algorithm SHA512
    Get-FileHash C:\path\to\file -Algorithm MD5

    Calculate Hash under Linux

    Under many of the popular Linux distributions you can use the sha256sum command to calculate the SHA256 hash of a file:

    sha256sum /path/to/file

    There are similar commands to calculate the SHA1, SHA512 and MD5 hashes:

    sha1sum /path/to/file
    sha512sum /path/to/file
    md5sum /path/to/file

    Calculate Hash on the Mac

    On the Mac command line you can use the shasum command to calculate the SHA256 hash:

    shasum -a 256 /path/to/file

    Replacing “256” with 1,224,384 or 512 allows you to calculate other hashes:

    shasum -a 1 /path/to/file
    shasum -a 224 /path/to/file
    shasum -a 384 /path/to/file
    shasum -a 512 /path/to/file

    Verify the Checksum

    Finally once you have calculated the checksum simply compare the output to the value shown by the commands above to the one on the download page.

    Here is an example using Linux where I downloaded a file “npp.7.9.2.Installer.exe” and verified that the checksum matched the checksum published by the author.

    Verify Checksum example in Linux.
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleSyncwire 3.5mm Audio Cable
    Next Article List Files in a Folder Using VBScript

    Related Posts

    Left or Right Pad a String with a VBScript Function

    List Files in a Folder Using VBScript

    Lenovo T460 Trackpad Ubuntu 18.04 Fixes

    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Recent Posts
    November 20, 2022

    Hard Drive Repair After Wrong Voltage Mishap

    March 22, 2022

    How To Send Excel Workbook As Email Using Button

    January 30, 2022

    Compare EV Chargers

    Categories
    • 3D Printing
    • Android
    • Arduino
    • Development
    • ESP8266
    • Excel
    • Gaming
    • General
    • GIMP
    • Home Automation
    • JavaScript
    • Linux
    • Microsoft Office
    • Mobile Devices
    • Oracle APEX
    • Python
    • Raspberry Pi
    • Reviews
    • Security
    • SharePoint
    • Tutorials & Help
    • VBScript
    Tags
    Android APEX Apple Arduino Black Friday csv Elite Dangerous email ESP-01 ESP8266 EV Excel file handling gaming GIMP Gritin Home Assistant Home Automation IMNEED Joystick Linux lists Lumsing Media os.stat os.walk Phishing Power Python Qi Review scam Security select SharePoint 2010 string Syncwire text text files TrueCrypt Ubuntu USB-C VBA VBscript Windows 10
    Web Tools

    A set of quick and basic online tools for web designers and software developers :

    • Hash Generator
    • Text to HTML List
    • Text to HTML Table
    • URL Encoder and Decoder
    • UNIX Timestamp Calculator
    • LED Resistor Calculator
    • Extract Email from Text
    • Mortgage Calculator
    About

    Welcome to Technology Spy, a site devoted to gadgets, computers, programming and all things technology! You’ll also find product reviews for items I own as well as tutorials, guides and scripts for the software I use.

    Archives
    Other Resources
    • MattsBits
    • Raspberry Pi Spy
    Facebook Twitter Instagram Pinterest

    Entries RSS | Comments RSS

    Copyright © 2022 - All Rights Reserved - Matt Hawkins

    mastodon.social@MattHawkins

    Type above and press Enter to search. Press Esc to cancel.