bcrypt library
- Install
bcrypt
library from the command line:
pip install bcrypt
- Generate bcrypt password hash:
import bcrypt
cost = 14
password = 'Hello'
passwordHash = bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt(cost))
passwordHash = passwordHash.decode('utf-8')
print(passwordHash)
Leave a Comment
Cancel reply