Skip to content

Instantly share code, notes, and snippets.

@cyberplant
Created April 13, 2015 20:28
Show Gist options
  • Save cyberplant/a81717e3956ed5e19b1d to your computer and use it in GitHub Desktop.
Save cyberplant/a81717e3956ed5e19b1d to your computer and use it in GitHub Desktop.
import hmac
import hashlib
import base64
AWS_SECRET_KEY = raw_input("AWS Secret Key >")
MESSAGE = "SendRawEmail"
VERSION = chr(0x02)
hm = hmac.new(AWS_SECRET_KEY, msg=MESSAGE, digestmod=hashlib.sha256)
print base64.b64encode(VERSION + hm.digest()).decode()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment