I have a project that is throwing an error on the following line:
var rsaCrypto = new RSACrypto(1024);
RSACrypto
was located in System.Security.Cryptography.RSA
of mscorlib 4.0.0.0.
However, that is not so with mscorlib 5.0.5.0 (confirmed via Object Browser):
What gives? How do I get RSA back so I can compile?
In the question comments, @DaveZych mentioned that mscorlib [5.0.5.0] is Silverlight 5 and both @PatrickHofman and @SLaks mentioned that RSA
is not available in Silverlight.
They are all correct, and as it turns out, it wasn't the mscorlib
assembly reference at all.
It was missing DH.Scrypt.dll which is an assembly that Dustin Horne wrote and published to http://scrypt.codeplex.com/ so that RSA Cryptography can be used in Silverlight 3, 4, and 5.