Rabu, 18 Agustus 2010
Getting a “System.ArgumentException: Value was invalid” when trying to sign data using SHA256CryptoServiceProvider
Here is the symptom: 1. You are using RSACryptoServiceProvider for computing SHA-2 signatures. 2. Doing this you get unhandled exceptions of type "System.ArgumentException" in mscorlib.dll saying "Value was invalid". 3. A typical call that failed was:byte[] signature = rsa.SignData(data, new SHA256CryptoServiceProvider()); 4. The SHA1CryptoServiceProvider did not reproduce the
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar