PyMenuSite/hash.py

27 lines
743 B
Python
Raw Normal View History

2023-02-11 08:37:10 -05:00
import bcrypt
# Declaring our password
password = b'GeekPassword'
# Adding the salt to password
salt = bcrypt.gensalt()
# Hashing the password
hashed = bcrypt.hashpw(password, salt)
print(salt)
print(type(hashed))
salt = hashed[:29]
print(salt)
print(password == bcrypt.hashpw(password, salt))
print(password == bcrypt.hashpw(password, salt))
print(password == bcrypt.hashpw(password, salt))
print(password == bcrypt.hashpw(password, salt))
print(password == bcrypt.hashpw(password, salt))
print(password == bcrypt.hashpw(password, salt))
print(password == bcrypt.hashpw(password, salt))
print(password == bcrypt.hashpw(password, salt))
print(password == bcrypt.hashpw(password, salt))
print(password == bcrypt.hashpw(password, salt))