I was trying out the RSA encryption code, referring to some of the codes online, and I tried this
var encryptedData = RSA.Encrypt(testDatabyte, publicKey)
but error came out mentioning that
System.Security.Cryptography.RSA does not contain definition for Encrypt
I am using .NET framework 4.5.1. Can i know how should I proceed?
What I have tried:
-referred to msdn microsoft and tried to add assemblies like
System.Security.Cryptography.AsymmetricAlgorithm
System.Security.Cryptography.RSA
System.Security.Cryptography.RSACryptoServiceProvider
but all of them is a type not a namespace
-have check the .Net framework version in msdn, and it did mention it is supported