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 [EMAIL PROTECTED]

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

--- shadow/76398        2005-10-10 11:10:35.000000000 -0400
+++ shadow/76398.tmp.18272      2005-10-10 22:07:39.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 76398
 Product: Mono: Class Libraries
 Version: 1.1
 OS: SUSE 9.2
 OS Details: 
-Status: NEW   
-Resolution: 
-Severity: 
+Status: RESOLVED   
+Resolution: WONTFIX
+Severity: Unknown
 Priority: Normal
 Component: CORLIB
 AssignedTo: [EMAIL PROTECTED]                            
 ReportedBy: [EMAIL PROTECTED]               
 QAContact: [EMAIL PROTECTED]
 TargetMilestone: ---
@@ -40,6 +40,34 @@
 Runs with MS.NET.
 
 ------- Additional Comments From [EMAIL PROTECTED]  2005-10-10 11:10 -------
 Created an attachment (id=15895)
 Test Case
 
+
+------- Additional Comments From [EMAIL PROTECTED]  2005-10-10 22:07 -------
+Yes this is a (known) difference between .NET and Mono. But depending
+on this behaviour as a _very_bad_ thing (i.e. that's looking for trouble).
+
+Why ? because the creation of cryptographic algorithms can be changed,
+without recompiling applications, by changing the file machine.config
+to point to a different implementation (e.g. hardware assisted
+cryptography, a bug in the default implementation - like MS changed
+the default SHA1 from SHA1CryptoServiceProvider to SHA1Managed for
+WSE1, ...).
+
+So ? Your sample code is "bad". There's no guarantee that another
+_legal_ transform implementation will "behave" exactly like the
+"original" one. There are two key "properties" here (a)
+CanReuseTransform (which is causing this "bug" as it returns true on
+MS and false on Mono) and (b) CanTransformMultipleBlock - and you
+can't be 100% sure of the value they return until you call them (it
+could change in a future version of the framework, between SP, when
+adding new software...).
+
+How to fix this ? 
+* the easy way is to use a CryptoStream - which will not use
+transforms in ways they do not support (e.g. reuse, multiple blocks); 
+or
+* call both properties (and adjust the code) before using any crypto
+transforms.
+
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to