Skip to content

Instantly share code, notes, and snippets.

@h3nryza
Created July 17, 2018 16:45
Show Gist options
  • Save h3nryza/b08a3f8ce4f9a27dffb99c990fe0297c to your computer and use it in GitHub Desktop.
Save h3nryza/b08a3f8ce4f9a27dffb99c990fe0297c to your computer and use it in GitHub Desktop.
Python hashes with Hashlib
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
import hashlib
md = hashlib.md5(r"some text").hexdigest()
sha1 = hashlib.sha1(r"some text").hexdigest()
sha256 = hashlib.sha256(r"some text").hexdigest()
sha512 = hashlib.sha512(r"some text").hexdigest()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment