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.