Author: spouliot
Date: 2007-03-22 14:43:04 -0500 (Thu, 22 Mar 2007)
New Revision: 74829

Modified:
   trunk/mcs/class/corlib/System.Security.Cryptography/ChangeLog
   trunk/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs
Log:
2007-03-22  Sebastien Pouliot  <[EMAIL PROTECTED]>
        * PasswordDeriveBytes.cs: Reset method was fixed in fx 2.0.


Modified: trunk/mcs/class/corlib/System.Security.Cryptography/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Security.Cryptography/ChangeLog       
2007-03-22 19:21:12 UTC (rev 74828)
+++ trunk/mcs/class/corlib/System.Security.Cryptography/ChangeLog       
2007-03-22 19:43:04 UTC (rev 74829)
@@ -1,8 +1,9 @@
-2007-03-22  Sebastien Pouliot  <[EMAIL PROTECTED]> 
+2007-03-22  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * CryptoConfig.cs: Names are case-insensitive only since fx 2.0.
        * CryptoStream.cs: 2.0 introduce different exceptions/behaviors in 
        corner cases.
+       * PasswordDeriveBytes.cs: Reset method was fixed in fx 2.0.
 
 2007-03-05  Sebastien Pouliot  <[EMAIL PROTECTED]>
 

Modified: 
trunk/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs
===================================================================
--- trunk/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs  
2007-03-22 19:21:12 UTC (rev 74828)
+++ trunk/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs  
2007-03-22 19:43:04 UTC (rev 74829)
@@ -5,7 +5,7 @@
 //     Sebastien Pouliot ([EMAIL PROTECTED])
 //
 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2007 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -242,10 +242,10 @@
                        throw new IndexOutOfRangeException ("cb");
 
                if (state == 0) {
-                       state = 1;
                        // it's now impossible to change the HashName, Salt
                        // and IterationCount
                        Reset ();
+                       state = 1;
                }
 
                byte[] result = new byte [cb];
@@ -298,7 +298,11 @@
 
        public override void Reset () 
        {
+#if NET_2_0
+               state = 0;
+#else
                // note: Reset doesn't change state
+#endif
                position = 0;
                hashnumber = 0;
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to