pswd-hashing-tools

command module
v0.0.0-...-830a97e Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2019 License: MIT Imports: 7 Imported by: 0

README

GoDoc Supported Go Versions

Password-hashing tools

Command line utility with which you can play with various crypto algorithms for make hash from given password string and compare its matching after with different hashes values.

Currently Supported Algorithms:
  • Bcrypt - based on the Blowfish cipher, and presented at USENIX in 1999
  • Scrypt - created by Colin Percival, originally for the online backup service
  • Argon2 - winner of the Password Hashing Competition in July 2015

Installation

Building from sources (Windows, MacOS, or Linux)

Requirement:

$ go get github.com/andskur/pswd-hashing-tools
$ cd $GOPATH/src/github.com/andskur/pswd-hashing-tools
$ glide install
$ go build

Usage

$ ./paswd-hashing-tools -h
Tools for hashing passwords and compare result with string

Usage: [COMMAND][ARGUMENT][-FLAGS]

Available Commands:
  compare   [password] ['hash']     Compare given string with a given hash
  hash      [password]              Hash given string
  help                              Help about any command

Password and hash arguments are optional, you can type it in stdin after command execution

Flags:
  -a, --algorithm string   password hashing crypto algorithm to use (default "bcrypt")
  -h, --help               help for this command
  -p, --prehash            prehash algorithm to use
  
Available algorithms:
  bcrypt
  scrypt
  argon2
  
Available prehash algorithms:
  SHA2
  SHA3

Use " [command] --help" for more information about a command.
Examples

Hashing password:

$ ./pswd-hashing-tools hash -a scrypt
Using Scrypt hashing algorithm 
Enter password for hash:
qwerty123
Resulting: 16384$8$1$65e43a1b1ba8983e4ae2c92f2a78b298$2f136899f314c9ff1ec57c175fe824eea37c6499facab44dc8b680e52343a357

Compare password with hash :

$ ./pswd-hashing-tools compare qwerty123 '$2a$10$uXvEFzrJyr6dzEmBORB/s.tky7Wcn2Q7AX1Ap32o2SWm6GoTs6wQG' -a bcrypt
Using Bcrypt hashing algorithm 
Hash and password are matching

Built With

  • Cobra - A Commander for modern Go CLI interactions
  • Glide - Package Management for Golang
  • Simple-scrypt - A convenience library for working with Scrypt hashing algorithm

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

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