Skip to content

Instantly share code, notes, and snippets.

@T0w3ntum
Created February 17, 2018 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save T0w3ntum/757e43cfcd96bd96a54fd7a573387c8e to your computer and use it in GitHub Desktop.
Save T0w3ntum/757e43cfcd96bd96a54fd7a573387c8e to your computer and use it in GitHub Desktop.
import hashlib
import hmac
import sys
secret = sys.argv[2]
message = bytes(sys.argv[1]).encode('utf-8')
secret = bytes(secret).encode('utf-8')
hash = hmac.new(secret, message, hashlib.sha256)
print hash.hexdigest()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment