My DNN module encrypts some data using my public key and presents it to the user. The user submits this data to me for processing. I decrypt the data with my private key and use it. I use the .Net RSACryptoServiceProvider for encryption/decryption. This has worked well till now. I received some data from a customer, which throws an error when I attempt to decrypt it - Value cannot be null. Parameter name: rgb
Since the encryption is happening on the user's server, I was wondering if there are any environmental factors that could affect it. I am really not sure how to proceed with narrowing down the problem. What makes the same code behave differently on a different server?
Edit: Added Stacktrace
System.ArgumentNullException: Value cannot be null. Parameter name: rgb at S开发者_开发问答ystem.Security.Cryptography.RSACryptoServiceProvider.Decrypt(Byte[] rgb, Boolean fOAEP) at MyWS.MyMethod(String param1, String EncryptedData, String& errMsg) --- End of inner exception stack trace ---
It turns out to be the most basic problem - Wrong User Input. :(
Well.
精彩评论