I am trying to use RSA public key using RSACryptoServiceProvider and use it for encryption through window.crypto.subtle but ending with Cryptography_OAEPDecoding upon decryption.
//Generating public key:
var cspParams = new CspParameters { KeyContainerName = containerName };
using (var rsa = new RSACryptoServiceProvider(cspParams))
{
var rsaparameters = rsa.ExportParameters(true);
var base64ModulusKey = GetModulusKey(rsaparameters);
return base64ModulusKey;
}
Hi,
I am trying to use RSA public key using RSACryptoServiceProvider and use it for encryption through window.crypto.subtle but ending with Cryptography_OAEPDecoding upon decryption.
//Generating public key:
Encryption through window.crypto.subtle:
//Decryption using private key:
Thanks in advance!