Skip to content

Instantly share code, notes, and snippets.

@lowellbander
Created June 15, 2016 00:17
Show Gist options
  • Select an option

  • Save lowellbander/5b8d3de8a2205f8c203ec9f1bb0aab36 to your computer and use it in GitHub Desktop.

Select an option

Save lowellbander/5b8d3de8a2205f8c203ec9f1bb0aab36 to your computer and use it in GitHub Desktop.
def makeHash(password):
return sha256(password.encode('utf-8')).hexdigest()
# the `password` argument must be encoded before being hashed to avoid the following error:
# TypeError: Unicode-objects must be encoded before hashing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment