File size: 312 Bytes
8cea485
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
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}")