Skip to content

Instantly share code, notes, and snippets.

@glynrob
Created October 19, 2013 18:03
Show Gist options
  • Save glynrob/7059316 to your computer and use it in GitHub Desktop.
Save glynrob/7059316 to your computer and use it in GitHub Desktop.
Python hashing example
md5 = hashlib.md5()
md5.update(password+saltstring)
print 'MD5 = '+md5.hexdigest()
sha1string = hashlib.sha1(password + saltstring)
print 'SHA1 = '+sha1string.hexdigest()
sha1string = hashlib.sha512(password + saltstring)
print 'SHA512 = '+sha1string.hexdigest()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment