import bcrypt print("Hi") def encrypt_master_pass(passwd: str) -> tuple[bytes, bytes]: """Hashes master password and return tuple of hashed password and salt""" salt = bcrypt.gensalt() hashed = bcrypt.hashpw(passwd.encode("utf-8"), salt) return (hashed, salt) def encrypt_master_pass_known_salt(passwd: str, salt: bytes) -> bytes: return bcrypt.hashpw(passwd.encode("utf-8"), salt)