C# RSA encrypt/decrypt throws exception
问题 I'm trying to set up a simple server side RSA encryption of a small chunk of info which is to be decrypted on the client side. Just as a proof of concept I wrote a few lines to ensure that the public and private key could be loaded from xml. However, I'm struggling to make even the most simple stuff work on my machine: byte[] bytes = Encoding.UTF8.GetBytes("Some text"); bool fOAEP = true; // seeding a public and private key RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(); var