Aller au contenu principal

bcrypt Hash & Verify

Développeur

Storing plaintext passwords is an incident, and storing MD5 is a slower incident — MD5 runs by the billion per second, so cracking is nearly free. bcrypt is still the default because it salts automatically (same password, different hash every time), embeds the salt and cost in the hash string (so verification needs no extra column), and is deliberately slow. This page puts generation and verification side by side, which is handy for checking whether the hashes in your database actually match.

Chargement de l’outil…

Mode d'emploi

4 étapes
  1. 01

    Type the password, pick a cost factor (10–12 for production) and press Generate bcrypt hash.

  2. 02

    The hash looks like `$2b$10$…` and is 60 characters; store that single column — no separate salt.

  3. 03

    To verify, paste an existing hash into the box, enter the password and press Verify.

  4. 04

    Higher cost is slower: 14 takes over a second per check, which will drag down a login endpoint.

Technical Notes & Guide

1

Why the same password produces a different hash each time

bcrypt mixes in a 16-byte random salt that is encoded inside the hash string itself. Verification reads the salt back out and recomputes, so results still match. The practical rule: never compare two hashes to decide whether two passwords are equal — always call the verify function.

Questions fréquentes

2 questions
Q1Can the hash be reversed?

No. bcrypt is one-way; sites claiming to “decrypt bcrypt” are running a dictionary attack. Long passwords with a high cost factor are effectively unguessable.

Q2What is the difference between $2a$, $2b$ and $2y$?

They are revisions of the same algorithm with slightly different handling of inputs over 72 bytes. Modern implementations emit `$2b$`; verification accepts all three prefixes.

Développeur