Skip to content
/ crypt Public

Crypt - a simple utility to generate and verify bcrypt hashes on the fly.

Notifications You must be signed in to change notification settings

iwittkau/crypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crypt

Simple utility to generate and verify bcrypt hashes on the fly.

Installation

Go is required

go install github.com/iwittkau/[email protected]

Usage

crypt [-hash]

If no hash is given a new hash will be generated from the password you enter.

If the hash flag is set the hash will compared to the password entered. There will be either an error output if the hash is not a hash or does not match the password or an "OK" if the hash is valid and does belong to the password.

Set a hash like this (password = "test"):

crypt -hash='$2a$04$XYTflRUXi7dgWJodhsYpQO.BgPjdd9Hkjgx1GTvoqO9qCNrCH/fi6'

Security

crypt uses golang.org/x/crypto/ssh/terminal's ReadPassword to read the password. This avoids reading the password from stdin as string.
Reading the password as a string can expose passwords because they reside in memory as such.

About

Crypt - a simple utility to generate and verify bcrypt hashes on the fly.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages