Git Product home page Git Product logo

hash-brown's Introduction

Hash Brown

CircleCI codecov License PyPI

A simple command-line utility for calculating checksums.

Install

pip install hb

Usage

Calculate the sha1 of a file:

$ hb -a sha1 hello.txt
sha1 (hello.txt) = 493a253abf93d705d67edeb463134a5c8752fc9d

Check to see if file matches a given checksum:

$ hb -a md5 hello.txt -g 77060c267470021a97392b815138733e
md5 (hello.txt) = 77060c267470021a97392b815138733e OK

$ hb -a md5 hello.txt -g 0123456789abcdef
md5 (hello.txt) = 0123456789abcdef BAD

Checksums can be read from a file:

$ hb -c checksums.txt
sha512 (hello.txt) = 493a253abf93d705d67edeb463134a5c8752fc9d OK
sha512 (world.txt) = 683e4ee04e75e71a6dca42807001f00be1fcb2a3 OK
sha512 (image.jpg) = f3a53e6c2743645f08faedadd7a2c57cbc38632f OK
sha512 (video.mp4) = 03ba9191fc4cd74f218df58542643fbc07dca532 OK

Hash Brown outputs its results in BSD style. The checksum files are also BSD style.

All files are read in binary mode.

Globbing and recursive globbing are supported via * and ** respectively.

Dotfiles are not included when globbing and need to be specified explicitly.

Options

-a, --algorithm [blake2b|blake2s|md5|sha1|sha224|sha256|sha384|sha512|adler32|crc32]
-c, --check                     Read checksums from a file.
-g, --given TEXT                See if the given checksum `TEXT` matches the
                                computed checksum. (use with -a)
-p, --parallel                  Process files in parallel.
-q, --quiet                     Hide results that are OK. (use with -c)
-t, --timer                     Display elapsed time in seconds.
--version                       Show the version and exit.
-h, --help                      Show this message and exit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.