I read on MSDN ( see Important Note ) that RSACryptoServiceProvider should be removed. They give an example:
using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider())
Now I am trying to enable RSACryptoServiceProvider in MyClass using it in several methods. With this installation, I cannot use the using statement.
Instead, I try to call the .Dispose () method of the RSACryptoServiceProvider object at the appropriate time, but then I get a compilation error:
`System.Security.Cryptography.AsymmetricAlgorithm.Dispose (bool) 'is unavailable due to protection level
Perhaps RSACryptoServiceProvider is not used for more than one function call (using the using statement)?
How can I fix this, doesn't make the Dispose option an option?
source share