CryptographicException “Key not valid for use in specified state.” while trying to export RSAParameters of a X509 private key

后端 未结 7 1644
悲&欢浪女
悲&欢浪女 2020-12-03 06:34

I am staring at this for quite a while and thanks to the MSDN documentation I cannot really figure out what\'s going. Basically I am loading a PFX file from the disc into a

7条回答
  •  广开言路
    2020-12-03 06:55

    I'm not exactly an expert in these things, but I did a quick google, and found this:

    http://social.msdn.microsoft.com/Forums/en/clr/thread/4e3ada0a-bcaf-4c67-bdef-a6b15f5bfdce

    "if you have more than 245 bytes in your byte array that you pass to your RSACryptoServiceProvider.Encrypt(byte[] rgb, bool fOAEP) method then it will throw an exception."

提交回复
热议问题