Skip to content

Instantly share code, notes, and snippets.

@gabbygobln
Created June 14, 2019 07:44
Show Gist options
  • Save gabbygobln/9722c34835e8f84eef6ed78a650175eb to your computer and use it in GitHub Desktop.
Save gabbygobln/9722c34835e8f84eef6ed78a650175eb to your computer and use it in GitHub Desktop.
Uses arguments as text input to hash them in SHA256
from sys import argv
script, string = argv
import hashlib
sha256 = hashlib.sha256()
sha256.update(string.encode('utf-8'))
output = sha256.hexdigest()
print(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment