Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby
- require 'openssl'
- require 'base64'
- sha256 = OpenSSL::Digest::Digest.new('sha256')
- secret_key = "Secret Access Key"
- message = "SendRawEmail"
- version = "\x02"
- signature = OpenSSL::HMAC.digest(sha256, secret_key, message)
- verSignature = version + signature
- smtp_password = Base64.encode64(verSignature)
- puts smtp_password
Advertisement
Add Comment
Please, Sign In to add comment