code: function generate_hmac(data, aws_secret_key, algorithm, encoding) {
      encoding = encoding || "base64";
      algorithm = algorithm || "sha256";
      return crypto.createHmac(algorithm, aws_secret_key).update(data).digest(encoding);
  }
docs: Get the signature/digest of a supplied input string.
  
  @param data [Required] the string to encode
  @param aws_secret_key [Required] Secret key used to access AWS services
  @param algorithm [Optional] Encryption algorithm, defaults to sha256
  @param encoding [Optional] The output encoding. Default to base64
  @returns String with encoded digest of the input string