I have an issue while I am creating the HMAC in LUA 5.1 version and same code is working in node.js
Node.js Code :
crypto.createHmac(
CONSTANTS.HMAC_ALORITHM_SHA,
Buffer.from(
secretAccessKey,
CONSTANTS.BASE64_ENCODING
)
).update(
Buffer.from(
stringToSign,
CONSTANTS.UTF8
)
).digest(
CONSTANTS.BASE64_ENCODING
);
I wanted to write in the same code LUa 5.1.