- Generate and verify, or just one?
- Both. Generate mode produces a hash from a password + cost. Verify mode checks a password against an existing hash.
- Why is verify slow?
- Bcrypt is intentionally expensive. Higher cost means slower — that's the security feature. Expect 100-500ms per verify at cost 10-12.
- Does bcrypt have a length limit?
- Yes — 72 bytes (not characters). Passwords longer than that are silently truncated. If you need to accept long passwords, pre-hash with SHA-256 and bcrypt the hash.
- Should I use bcrypt or argon2?
- Argon2 for new systems. Bcrypt for existing systems — don't migrate for migration's sake. Both are OWASP-approved for password storage.