* SymmetricTransform.cs: Before 2.0 an IndexOutOfRangeException was
thrown (for all unmanaged transforms) in case of an overflow.
svn path=/trunk/mcs/; revision=74826
+2007-03-22 Sebastien Pouliot <sebastien@ximian.com>
+
+ * SymmetricTransform.cs: Before 2.0 an IndexOutOfRangeException was
+ thrown (for all unmanaged transforms) in case of an overflow.
+
2007-03-05 Sebastien Pouliot <sebastien@ximian.com>
* SymmetricTransform.cs: Fix KeepLastBlock to be true for decryption
if (!encrypt && (0 > len) && ((algo.Padding == PaddingMode.None) || (algo.Padding == PaddingMode.Zeros))) {
throw new CryptographicException ("outputBuffer", Locale.GetText ("Overflow"));
} else if (KeepLastBlock) {
- if (0 > len + BlockSizeByte)
+ if (0 > len + BlockSizeByte) {
+#if NET_2_0
throw new CryptographicException ("outputBuffer", Locale.GetText ("Overflow"));
+#else
+ throw new IndexOutOfRangeException (Locale.GetText ("Overflow"));
+#endif
+ }
} else {
if (0 > len) {
// there's a special case if this is the end of the decryption process