Skip to content

Instantly share code, notes, and snippets.

@barboni
Created July 31, 2015 19:06
Show Gist options
  • Save barboni/4c64b6e0895aafd9e7c0 to your computer and use it in GitHub Desktop.
Save barboni/4c64b6e0895aafd9e7c0 to your computer and use it in GitHub Desktop.
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