hash

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

README

hash

A hash generator written in go


Usage:

hash <algorithm> <password>

Generate a hash of <password> using <algorithm>


Algorithms:
  • Implemented by default

  • Not implemented by default

  • MD4

  • MD5

  • SHA1

  • SHA224

  • SHA256

  • SHA384

  • SHA512

  • MD5SHA1

  • RIPEMD160

  • SHA3-224

  • SHA3-256

  • SHA3-384

  • SHA3-512

  • SHA512-224

  • SHA512-256

  • BLAKE2s-256

  • BLAKE2b-256

  • BLAKE2b-384

  • BLAKE2b-512


Examples:
Valid usage:
  • We use algorithm MD5 and password myPassword:
    ./hash MD5 myPassword
    Output: 3rFTb0gEdffVkyGaoa/XTA==

  • Different password or hash algorithm will return another hash:
    ./hash MD5 testPassword
    Output: /tO2GyYIGEk3gICzTmk9Lg==

  • We use algorithm SHA3-512 and password myPassword:
    ./hash SHA3-512 myPassword
    Output: e9NoZl7gdhx+atbv1M3I9ROijXEFim5qKa1Rwi3VXp0PiXcdCeCWHq7ptzTod29gpCd7tFWiPT1IRaMazItVOA==


Error messages:
  • We use an invalid algorithm and password myPassword:
    ./hash SHA5 myPassword
    Output: Unknown algorithm

  • We use a valid algorithm which is not implemented by default and password myPassword:
    ./hash MD5SHA1 myPassword
    Output: No implementation found

  • We use only one or no command line arguments: ./hash
    This prints the usage:
    Output: Usage: hash <algorithm> <password>


Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL