You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
}
using (var rsa = new RSACryptoServiceProvider(cspParams))
{
decryptedBytes = rsa.Decrypt(encryptedBytes, true);
}
Thanks in advance!
The text was updated successfully, but these errors were encountered:
kadandap
changed the title
Using RSACryptoServiceProvider public key in crypto.subtle encrypt
Issue in decryption crypto.subtle encrypted text using RSACryptoServiceProvider
Aug 22, 2019
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!
The text was updated successfully, but these errors were encountered: