Created
November 24, 2016 01:17
-
-
Save woowa-hsw0/c9722accee1a5f6f9b6940a13ee35876 to your computer and use it in GitHub Desktop.
AWS Secret key -> SES SMTP Password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# https://docs.aws.amazon.com/ko_kr/ses/latest/DeveloperGuide/smtp-credentials.html | |
from getpass import getpass | |
from hmac import HMAC | |
from hashlib import sha256 | |
key = getpass('AWS Secret Access Key: ') | |
message = "SendRawEmail" | |
versionInBytes = chr(0x02) | |
print (versionInBytes + HMAC(key, message, sha256).digest()).encode('base64') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment