Skip to content

Instantly share code, notes, and snippets.

@kingkorf
Created December 13, 2012 14:30
Show Gist options
  • Save kingkorf/4276714 to your computer and use it in GitHub Desktop.
Save kingkorf/4276714 to your computer and use it in GitHub Desktop.
Python SHA1 generator
#!/usr/bin/env python
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)
print "SHA1: " + m.hexdigest()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment