Complete the code to import the function used for hashing passwords.
from werkzeug.security import [1]
The generate_password_hash function is used to create a hashed password securely.
Complete the code to hash the password string 'mypassword'.
hashed = generate_password_hash([1])The generate_password_hash function accepts a plain string password directly.
Fix the error in the code to verify a password against its hash.
check_password_hash([1], 'mypassword')
The first argument must be the hashed password variable, not a string literal.
Fill both blanks to hash a password with method 'pbkdf2:sha256' and salt length 16.
hashed = generate_password_hash('secret', method=[1], salt_length=[2])
The method parameter specifies the hashing algorithm, and salt_length sets the salt size.
Fill all three blanks to check a password and print a message if it matches.
if check_password_hash([1], [2]): print([3])
Use the hashed password variable, the user input string, and a clear success message.