I have been battling with the following for a while and thought to ask help.
I am trying to compute a signature of a string using HMAC-SHA-256 algorithm in Apps Script.
And trying to reproduce the example with input and key example provided here
var input_string = "1KAD46OrT9HafiKdsXeg1588925778000"
var key_string = "4OHBOnWOqaEC1mWXOpVL3yV50s0qGSRC"
var test=Utilities.base64EncodeWebSafe(
Utilities.computeHmacSha256Signature(
input_string,
key_string
)
);
The above returns:
zqr7XM3C9yOp_T6R09IjjuDdmm18PDZd61D8KvJ3qoM=
Instead of (as show in signature example or from using this online tool):
ceaafb5ccdc2f723a9fd3e91d3d2238ee0dd9a6d7c3c365deb50fc2af277aa83
Any idea of what I am doing wrong ?
Thank you !!