2003-07-30 Sebastien Pouliot <spouliot@videotron.ca>
authorSebastien Pouliot <sebastien@ximian.com>
Wed, 30 Jul 2003 19:12:23 +0000 (19:12 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Wed, 30 Jul 2003 19:12:23 +0000 (19:12 -0000)
* CryptoStream.cs: Fixed bug #46143 (exception) - however we dont
returns the same result as MS. Class needs to be re-written.

svn path=/trunk/mcs/; revision=16908

mcs/class/corlib/System.Security.Cryptography/ChangeLog
mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs

index 70cd0b852fe65196ea1bce3f3b29a79335f75553..73c0d3902032f0a3befad5f73c00d6e8cb15d2f5 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-30  Sebastien Pouliot  <spouliot@videotron.ca>
+
+       * CryptoStream.cs: Fixed bug #46143 (exception) - however we dont 
+       returns the same result as MS. Class needs to be re-written.
+
 2003-07-09  Lluis Sanchez Gual  <lluis@ximian.com>
 
        * SymmetricAlgorithm.cs: Fixed FinalEncrypt. Return empty array if inputCount is 0.
index 90997b57ccb20b6645cf99a2367ee213878a0b96..b83e2e222bf5a37f64665cac0aedae2f0f7ba983 100755 (executable)
@@ -84,7 +84,8 @@ public class CryptoStream : Stream {
                //if (_mode != CryptoStreamMode.Write)
                //      throw new NotSupportedException ();
 
-               if (!_flushedFinalBlock)
+               // only flush in write mode (bugzilla 46143)
+               if ((!_flushedFinalBlock) && (_mode == CryptoStreamMode.Write))
                        FlushFinalBlock ();
 
                if (_stream != null)