Generate bcrypt hashes from the command line

dev-master 2014-03-14 21:09 UTC

This package is not auto-updated.

Last update: 2020-07-06 05:29:42 UTC


Command line bcrypt hash generator. Useful for computing bcrypt hashes while developing.


  1. Add this package to your composer.json file, in the require-dev section
        "require-dev": {
            "robertboloc/bcrypt-generator": "dev-master"
  1. Run composer update

This will install the script into vendor/bin/bcrypt_generator.php


Execute the CLI script providing some/all of the following options :

--help | -h Get usage information.
--text | -t Text to get hashed.

For example calling the script using the -t option:

php vendor/bin/bcrypt_generator.php -t admin

Will output something like:



If you use this with a real password add a space before the php call to avoid the command showing in your shell's history.