flare / generate_password_hash.py
ciyidogan's picture
Create generate_password_hash.py
8cea485 verified
raw
history blame
312 Bytes
import hashlib
def generate_password_hash(password):
hash_value = hashlib.sha256(password.encode()).hexdigest()
return hash_value
if __name__ == "__main__":
password = input("Enter the password to hash: ")
hash_result = generate_password_hash(password)
print(f"SHA256 Hash:\n{hash_result}")