Cryptographic Hashing with Flask-Bcrypt6:50 with Kenneth Love
Letting users create accounts is great but until we responsibly store the passwords, we really shouldn't open the doors. We'll use the super-strong `bcrypt` library to hash their passwords before the store them so we know our data is secure.
pip install flask-bcrypt
from flask_bcrypt import generate_password_hash instead of
from flask.ext.bcrypt import generate_password_hash
flask.ext.bcrypt- The path where Flask Bcrypt is available.
generate_password_hash()- function to generate a hash from a string. Takes an optional number of rounds of hashing to use. More rounds always makes the process take longer.
check_password_hash()- function to check a hash against a string to see if they match.
You need to sign up for Treehouse in order to download course files.Sign up