19 def check_pw(self, plaintext_pw: str, stored_hashed_password: str) -> bool:
22 password_bytes = plaintext_pw.encode(
'utf-8')
23 stored_hashed_password_bytes = stored_hashed_password.encode(
'utf-8')
26 return bcrypt.checkpw(password_bytes, stored_hashed_password_bytes)