1>>> import bcrypt
2>>> password = b"super secret password"
3>>> # Hash a password for the first time, with a randomly-generated salt
4>>> hashed = bcrypt.hashpw(password, bcrypt.gensalt())
5>>> # Check that an unhashed password matches one that has previously been
6>>> # hashed
7>>> if bcrypt.checkpw(password, hashed):
8... print("It Matches!")
9... else:
10... print("It Does not Match :(")
11