Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hashlib
- # Declaring our password
- password1 = 'GeekPassword'
- password2 = 'GeekPassword'
- '''
- można dodać 'sól' ale nie jeest to konieczne - przykład w źródle
- '''
- hashed1 = hashlib.md5(password1.encode())
- hashed2 = hashlib.md5(password2.encode())
- # sposób na wyświetlenie (i porównanie) hashy
- hash1 = hashed1.hexdigest()
- hash2 = hashed2.hexdigest()
- print("Hashed1", hash1 )
- print("Hashed2", hash2 )
- print('Czy takie same:', hash1 == hash2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement