locked
Encrypting Data with a public Key RRS feed

  • Question

  •  

    Hi All

    Having and issue with encrypting data using a public key, the key is sent from the ToXmlString from the params of a private and public key pair.

    I load them using the FromXmlString to the RSA provider, and as you can see it says it has the public key only which you would expect.

    But when i try to encrypt something i get the error you can see.

    Anyone got any ideas?


    Regards

    Danny

    Thursday, March 13, 2008 1:20 PM

Answers

  • According to the exception, either the CSP could not be obtained, or the length of the rgb parameter is greater than the maximum length. Since you don't provide everything, we can't tell from what you have given.

    Thursday, March 13, 2008 3:58 PM
  •  

    Hi Thanks for the reply

     

    Having no replies forced me to look more in depth and i found i was encrypting to much data. So have gone down the semmertic route with RSA encoding the key.

     

    Thanks

     

    Danny

    Thursday, March 13, 2008 4:01 PM

All replies

  • According to the exception, either the CSP could not be obtained, or the length of the rgb parameter is greater than the maximum length. Since you don't provide everything, we can't tell from what you have given.

    Thursday, March 13, 2008 3:58 PM
  •  

    Hi Thanks for the reply

     

    Having no replies forced me to look more in depth and i found i was encrypting to much data. So have gone down the semmertic route with RSA encoding the key.

     

    Thanks

     

    Danny

    Thursday, March 13, 2008 4:01 PM