Bcrypt Generator API
Hash a password with bcrypt (random salt), or check a password against an existing bcrypt hash.
POST /api/v1/tools/bcrypt-generatorMCP bcrypt_generatorSecurity & PrivacyRandom outputHash a password with bcrypt at cost 4 to 15, check a password against a bcrypt hash, or split a hash into version, cost and salt. Runs in your browser.
Input
Send these as a JSON object. Unknown fields are rejected.
- mode
- hash: create a new bcrypt hash. verify: check password against hash. (string, one of hash, verify, default "hash")
- password
- The password. bcrypt only uses the first 72 bytes (UTF-8). (string, up to 1000 characters, required)
- cost
- Cost factor (log2 rounds) when hashing, 4 to 12. 10–12 is typical. (integer, 4 to 12, default 10)
- version
- Hash prefix when hashing: 2b (modern default), 2y (PHP/Apache) or 2a (legacy). (string, one of 2b, 2y, 2a, default "2b")
- hash
- The bcrypt hash to check against, e.g. $2b$10$…; required for verify. Cost must be 12 or less. (string, up to 100 characters)
curl https://pithlab.com/api/v1/tools/bcrypt-generator \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"mode":"hash","password":"correct horse battery staple","cost":10}'