Skip to content

Instantly share code, notes, and snippets.

@woakas
Created July 22, 2016 14:20
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 woakas/8f4ae5be961f9f083b8a4f8ab14eb956 to your computer and use it in GitHub Desktop.
Save woakas/8f4ae5be961f9f083b8a4f8ab14eb956 to your computer and use it in GitHub Desktop.
import hmac
import hashlib
import base64
key = "AWS_SECRET_KEY"
version = '\x02'
message = "SendRawEmail"
h = hmac.new(key, message, digestmod=hashlib.sha256)
p = base64.b64encode("{0}{1}".format(version, h.digest()))
print "Password: ", p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment