i would like to create a public/private key RSA with the Apps Script service of Google. I found documentation but it's not seen to have someting like "generate key" or like in c# using the RSACryptoServiceProvider
when you can create a key and export it to XML.
I take a look on this documentation https://developers.google.com/apps-script/reference/utilities/
var signature = Utilities.computeRsaSha256Signature("this is my input",
"-----BEGIN PRIVATE KEY-----\nprivatekeyhere\n-----END PRIVATE KEY-----\n");
How can i generate my "KEY" what is the right method to do it ?
To clarify my request, in c# we can do it like that.
using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(keySize))
{
privateKey = RSA.ToXmlString(true);
}
That will generate a private key runtime, i try to do the same with Apps Script, is it possible ?
edited part
In fact i already have a javascript class with whoe i can generate RSA key but it's take to much time run it in .Gs code file. My Javascript code work well in a browser, but when it run into a .gs file ... it's seen to be very more slowly
I am looking for a "Native" service from Google to do it ..