Skip to content

Instantly share code, notes, and snippets.

@kingkorf
Created December 14, 2012 08:08
Show Gist options
  • Save kingkorf/4283556 to your computer and use it in GitHub Desktop.
Save kingkorf/4283556 to your computer and use it in GitHub Desktop.
Python 3 SHA1 generator
#!/usr/bin/env python3
from getpass import getpass
from hashlib import sha1
password = getpass('Enter password: ')
repeat = getpass('Repeat password: ')
if (password != repeat):
print("Passwords do not match!")
exit(0)
m = sha1(password.encode('utf-8'))
print("SHA1: " + m.hexdigest())
@Valentino300
Copy link

@://Read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment