Learn

bcrypt Guide

About this tool

Hash a password with bcrypt, or verify a password against an existing bcrypt hash. The cost factor controls how much work each hash takes, and that expense is the whole point.

Questions

Which cost factor should I use?
Test the cost on the system that will verify the passwords, and follow your application’s current security policy. Higher costs take more work. This tool does not measure or report hash duration, so it cannot choose a cost for your server. Cost 4 in the example above is for learning only.
Why does the same password give a different hash every time?
Because bcrypt generates a random salt per hash and stores it inside the result. That is what stops two users who chose the same password from having the same hash.