robertboloc / bcrypt-generator
Generate bcrypt hashes from the command line
Installs: 50
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
pkg:composer/robertboloc/bcrypt-generator
Requires
This package is not auto-updated.
Last update: 2025-10-21 06:42:43 UTC
README
Command line bcrypt hash generator. Useful for computing bcrypt hashes while developing.
Installation
- Add this package to your
composer.jsonfile, in therequire-devsection
{
"require-dev": {
"robertmarsal/bcrypt-generator": "dev-master"
}
}
- Run
composer update
This will install the script into vendor/bin/bcrypt_generator.php
Usage
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:
$2y$14$foQAf3JxtdeRCwYVXiH6DOJqPb1fnqD79NZOsj.2q3lIxMNYCVgXK
Notes
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.