You can download this code by clicking the button below.
This code is now available for download.
This function checks if a password matches a given hash. It takes a password string and a hash as inputs and returns a boolean indicating whether the password matches.
Technology Stack : bcrypt
Code Type : Function
Code Difficulty : Intermediate
import bcrypt
def check_password_stretch(password, hashed):
return bcrypt.checkpw(password.encode('utf-8'), hashed)