[Mono-bugs] [Bug 60573][Nor] Changed - CryptoStream output 1 block short after Flush

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 22 Jun 2004 16:39:26 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sebastien@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=60573

--- shadow/60573	2004-06-22 14:22:47.000000000 -0400
+++ shadow/60573.tmp.28250	2004-06-22 16:39:26.000000000 -0400
@@ -1,16 +1,16 @@
 Bug#: 60573
 Product: Mono: Class Libraries
 Version: unspecified
 OS: unknown
 OS Details: Other
-Status: RESOLVED   
-Resolution: NOTABUG
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Normal
-Component: System.Security
+Component: CORLIB
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: t7@pobox.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
@@ -232,6 +232,17 @@
 
 from CryptoStream.cs: Write(..) (from 0.96 release sources)
 // transform all except the last block (which may be the last block
 // of the stream and require TransformFinalBlock)
 
 So, perhaps this isn't abug afterall (??...)
+
+------- Additional Comments From sebastien@ximian.com  2004-06-22 16:39 -------
+Well this is really a bug as MS implementation would process all the
+64 bytes with the same source code. Sadly CryptoStream has tons of
+strange behaviours which requires not to process the current block
+unless we are sure it's not the last one. Somehow this isn't the case
+in your sample code.
+
+Note that Flush doesn't call FlushFinalBlock as this would break any
+further use of the stream (nothing can be encrypted/decrypted after
+the final block).