/hashtool

A simple tool for hasing strings and files.

Primary LanguageGoApache License 2.0Apache-2.0

hashtool

Hashing tool

A simple tool for hasing strings and files.

Build and Install

  1. Install golang
$ go version
go version go1.17 xxx
  1. Clone the repository from GitHub
$ git clone https://github.com/pangduckwai/hashtool.git
  1. Build the executable hashtool
$ cd .../hashtool
$ go build
$ sudo ln -s hashtool /usr/local/bin/hashtool # for example

Usage

Usage:
 hashtool [version | help]
   {-a ALGR | --algorithm=ALGR}
   {-i FILE | --in=FILE}
   {-b SIZE | --buffer=SIZE}
   {-v | --verbose}
  • Commands

    • omitting means to do hashing
    • version
      • display the current version
    • help
      • display the help message
  • Options

    • -a algorithm | --algorithm=algorithm
      • hashing algorithm to use, support md5, sha1 and sha256
    • -i filename | --in=filename
      • name of the input file, omitting means input from stdin
    • -b size | --buffer=size
      • the buffer size used to read large inputs (1024KB)
    • -v | --verbose
      • display detail operation messages during processing if specified

Changelog

v0.1.0

  • first usable version