Created
July 31, 2015 19:06
-
-
Save barboni/4c64b6e0895aafd9e7c0 to your computer and use it in GitHub Desktop.
This file contains 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
if (sse) { | |
headers = { | |
"x-amz-server-side-encryption-customer-key": btoa(privateKey), | |
"x-amz-server-side-encryption-customer-key-MD5": md5b64(privateKey), | |
"x-amz-server-side-encryption-customer-algorithm": "AES256" | |
}; | |
} | |
function md5b64(data) { | |
return CryptoJS | |
.MD5(data) | |
.toString(CryptoJS.enc.Base64); | |
} | |
HTTP.call('GET', objectUrl, { | |
headers: headers, | |
responseType: 'blob' | |
}, function (err, success) {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment