Skip to content

Instantly share code, notes, and snippets.

@virtualhobbit
Created July 2, 2020 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virtualhobbit/6dfd3503ae7d9f1550c0acdb185b3ffd to your computer and use it in GitHub Desktop.
Save virtualhobbit/6dfd3503ae7d9f1550c0acdb185b3ffd to your computer and use it in GitHub Desktop.
var kDate = CryptoDigest.hmacSha256(CryptoEncoding.base64Encode("AWS4" + inSecretKey), CryptoEncoding.base64Encode(inAmzAuthDate));
var kRegion = CryptoDigest.hmacSha256(kDate, CryptoEncoding.base64Encode(inRegion));
var kService = CryptoDigest.hmacSha256(kRegion, CryptoEncoding.base64Encode(inService));
var kSigning = CryptoDigest.hmacSha256(kService, CryptoEncoding.base64Encode("aws4_request"));
var keySigning = CryptoEncoding.base64toHex(kSigning);
return keySigning;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment