Skip to content

TheodorSmall/hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>


About

A simple SHA512 generator written in go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages