Skip to content

Shpota/sha256

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

A shortcut script that helps verify sha256 sums faster

The script is based on sha256sum utility and allows to compare SHA 256 sums without downloading a file with the sum.

How to install

  • Option 1: Download the sha256 script and add it to your PATH variable.

  • Option 2: Add the following function to your .bashrc or .zshrc file:

    sha256() {
        echo "$1 $2" | sha256sum --check
    }

Make sure you have sha256sum utility installed.

How to use

You can compare SHA 256 sums in the following way:

sha256 <expected-sha-256-sum> <name-of-the-file>

Examples

sha256 94f874037b82ea5353f4061e543681a0e79657f787437974214629af8407d124 go1.13.1.linux-amd64.tar.gz

The output if the sums match:

go1.13.1.linux-amd64.tar.gz: OK

The output if the sums do not match:

go1.13.1.linux-amd64.tar.gz: FAILED

About

A shortcut script that helps verify sha256 sums faster

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages