Skip to content

Instantly share code, notes, and snippets.

@wbashir
Created September 1, 2013 01:18
Show Gist options
  • Save wbashir/6401718 to your computer and use it in GitHub Desktop.
Save wbashir/6401718 to your computer and use it in GitHub Desktop.
Base64 HMAC Encoding
def create_token():
message = bytes("Message")
secret = bytes("secret")
signature = base64.b64encode(hmac.new(secret, message, digestmod=hashlib.sha256).digest());
print(signature)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment