Skip to content

gamontal/bcrypt-util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OVERVIEW
========

A simple command-line utility to generate and compare a BCrypt hash.

INSTALLATION
============

$ npm install -g bcrypt-util

USAGE
=====

$ bcrypt --help

  Usage: bcrypt [options] [command]


  Commands:

    hash <string> [salt_rounds]  generate a BCrypt hash
    compare <string> <hash>      compare a BCrypt hash

  Options:

    -h, --help     output usage information
    -V, --version  output the version number


Generate a BCrypt hash:

$ bcrypt hash 'raw text'
$2a$10$O.YQ9gpS1ruOIBECVs5cFe9znc1NspGnRZJ.NRZtgxGkJqgSqlgTG

$ bcrypt hash 'raw text' 10
$2a$10$O.YQ9gpS1ruOIBECVs5cFe9znc1NspGnRZJ.NRZtgxGkJqgSqlgTG

Compare a BCrypt hash:

$ bcrypt compare 'raw text' '$2a$10$O.YQ9gpS1ruOIBECVs5cFe9znc1NspGnRZJ.NRZtgxGkJqgSqlgTG'
true


TESTING
=======

$ make test

Security Considerations
=======================

Besides incorporating a salt to protect against rainbow table attacks, bcrypt is an adaptive function: over time, the iteration count can be increased to make it slower, so it remains resistant to brute-force search attacks even with increasing computation power.
(https://en.wikipedia.org/wiki/Bcrypt)

LICENSE
=======

MIT


About

A simple command-line utility to generate and compare a BCrypt hash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published