File size: 257 Bytes
2c8b701
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import bcrypt

def hash_password(password: str) -> str:
    hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
    return hashed.decode()

new_password = ""
hashed_password = hash_password(new_password)
print(f"Hashed Password: {hashed_password}")