Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shoenig/bcrypt-tool
A CLI tool for bcrypt - hash a password, determine if password matches a hash, compute cost of hash
https://github.com/shoenig/bcrypt-tool
bcrypt cli cost hacktoberfest hash tool
Last synced: 3 months ago
JSON representation
A CLI tool for bcrypt - hash a password, determine if password matches a hash, compute cost of hash
- Host: GitHub
- URL: https://github.com/shoenig/bcrypt-tool
- Owner: shoenig
- License: mit
- Created: 2014-05-04T01:08:03.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T22:30:28.000Z (9 months ago)
- Last Synced: 2024-10-24T06:38:27.419Z (3 months ago)
- Topics: bcrypt, cli, cost, hacktoberfest, hash, tool
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 56
- Watchers: 4
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bcrypt-tool
===========`bcrypt-tool` is a dandy CLI tool for generating and matching bcrypt hashes
[![GitHub](https://img.shields.io/github/license/shoenig/bcrypt-tool.svg)](LICENSE)
# Project Overview
Module `github.com/shoenig/bcrypt-tool` provides a simple command line tool.
# Getting Started
#### Install from Releases
The `bcrypt-tool` tool is available from the [Releases](https://github.com/shoenig/bcrypt-tool/releases) page.
It is pre-compiled for many operating systems and architectures including
- Linux
- Windows
- MacOS
- FreeBSD
- OpenBSD
- Plan9#### Install from SnapCraft
[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/bcrypt-tool)
The `bcrypt-tool` command can be installed as a snap
```bash
$ sudo snap install bcrypt-tool
```#### Build from source
The `bcrypt-tool` command can be compiled by running
```bash
$ go get github.com/shoenig/bcrypt-tool
```### Examples
#### Generate Hash from a Password
```bash
$ bcrypt-tool hash p4ssw0rd
```
#### Generate Hash from a Password with Cost
```bash
$ bcrypt-tool hash p4ssw0rd 31
```
#### Determine if Password matches Hash
```bash
$ bcrypt-tool match p4ssw0rd $2a$10$nWFwjoFo4zhyVosdYMb6XOxZqlVB9Bk0TzOvmuo16oIwMZJXkpanW
```note: depending on your shell, you may need to escape the $ characters
#### Determine Cost of Hash
```bash
$ bcrypt-tool cost $2a$10$nWFwjoFo4zhyVosdYMb6XOxZqlVB9Bk0TzOvmuo16oIwMZJXkpanW
```
note: depending on your shell, you may need to escape the $ characters### Usage
```bash
bcrypt-tool [action] parameter ...
```#### Actions
- `hash [password] ` Use bcrypt to generate a hash given password and optional cost (4-31)
- `match [password] [hash]` Use bcrypt to check if a password matches a hash
- `cost [hash]` Use bcrypt to determine the cost of a hash (4-31)
# Contributing
The `github.com/shoenig/bcrypt-tool` module is always improving with new features
and error corrections. For contributing bug fixes and new features please file an issue.# License
The `github.com/shoenig/bcrypt-tool` module is open source under the [MIT](LICENSE) license.