- Lessons
Insecure Design
- Lab Preview
Want everyone on your software team to learn this? Get completion tracking and compliance reporting with Hacksplaining for Teams. Free 14-day trial.
Train my teamSmart Use of Encryption@app.post('/signup')
def do_signup():
username = request.form['username']
password = request.form['password']
# The user is signing up - calculated their password hash and save it to the database.
salt = bcrypt.gensalt()
hashed = bcrypt.hashpw(password.encode(), salt)
save_credentials(username, hashed)
return redirect('/login')