ForkCohereCoherepublished Jan 15, 2025seen 6d

cohere-ai/bcrypt-tool

forked from shoenig/bcrypt-tool

Open original ↗

Captured source

source ↗
published Jan 15, 2025seen 6dcaptured 15hhttp 200method plain

cohere-ai/bcrypt-tool

Description: A CLI tool for bcrypt - hash a password, determine if password matches a hash, compute cost of hash

Language: Go

License: MIT

Stars: 0

Forks: 0

Open issues: 1

Created: 2025-01-15T13:18:12Z

Pushed: 2025-11-20T01:39:51Z

Default branch: main

Fork: yes

Parent repository: shoenig/bcrypt-tool

Archived: yes

README: bcrypt-tool ===========

bcrypt-tool is a dandy CLI tool for generating and matching bcrypt hashes

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 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/bcrypt-tool)

The bcrypt-tool command can be installed as a snap

$ sudo snap install bcrypt-tool

Build from source

The bcrypt-tool command can be compiled by running

$ go get github.com/shoenig/bcrypt-tool

Examples

Generate Hash from a Password

$ bcrypt-tool hash p4ssw0rd

Generate Hash from a Password with Cost

$ bcrypt-tool hash p4ssw0rd 31

Determine if Password matches Hash

$ bcrypt-tool match p4ssw0rd $2a$10$nWFwjoFo4zhyVosdYMb6XOxZqlVB9Bk0TzOvmuo16oIwMZJXkpanW

note: depending on your shell, you may need to escape the $ characters

Determine Cost of Hash

$ bcrypt-tool cost $2a$10$nWFwjoFo4zhyVosdYMb6XOxZqlVB9Bk0TzOvmuo16oIwMZJXkpanW

note: depending on your shell, you may need to escape the $ characters

Usage

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.

Notability

notability 3.0/10

Routine fork of a utility repo