Generate bcrypt password from command line, input typing is hidden.
go run main.go
will be like this:
You can compile and make a shortcut to it by running:
go build -o bcrypt main.go
and move that bcrypt
generated file to somewhere in your system path.
Note: Make sure to give this build the right permissions to run on your operational system.
and then you can just run:
bcrypt
or via shell pipe:
echo "yourpassword" | bcrypt
cat file-with-plain-password.txt | bcrypt
To increase the cost of the hash, you should pass the argument --cost
or -c
, default is 10.
bcrypt -c 14
bcrypt --cost 14
DBAD.