-
-
Save tripliks/9a2afd13c2faf0654324 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