Reputation: 311
I tried the below code in my code.gs. I'm getting an error.
let privatekey = 'IcA3+ZwPmUMtAou4f9hJMg==';
var key = `-----BEGIN PRIVATE KEY-----\n${privatekey}\n-----END PRIVATE KEY-----\n`;
console.log(key)
var signature = Utilities.computeRsaSha256Signature("this is my input", key);
Logger.log(signature);
In the console I'm getting the key:
-----BEGIN PRIVATE KEY-----
IcA3+ZwEmUMtAou4f9hHMg==
-----END PRIVATE KEY-----
Error: Exception: Invalid argument: key
I have attached the ss of the error.
Can anyone help me with this error? why it's coming?
Upvotes: 0
Views: 280