2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Sun, 30 Jan 2005 20:00:11 +0000 (20:00 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Sun, 30 Jan 2005 20:00:11 +0000 (20:00 -0000)
* DSA.cs: Really fixed case where DSAParameters.Counter is 0.

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

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

index 3f66c7ea0b2014f25004290da4120e4d13de1dac..8e11ddd2dc912dd9245fe9d6b8665bebbffd24d6 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-30  Sebastien Pouliot  <sebastien@ximian.com> 
+
+       * DSA.cs: Really fixed case where DSAParameters.Counter is 0.
+
 2005-01-21  Sebastien Pouliot  <sebastien@ximian.com> 
 
        * DSA.cs: Handle the case where DSAParameters.Counter is 0.
index e41fa90a03b4fea21c63e6ca0ebb3a83a6cbe0c7..be07e9a4f7af538cd53d1e9b2f88924e7601877c 100755 (executable)
@@ -158,9 +158,9 @@ namespace System.Security.Cryptography {
                                        // the number of bytes is important (no matter == 0x00)
                                        byte[] inArr = BitConverterLE.GetBytes (dsaParams.Counter);
                                        int l = inArr.Length;
-                                       while (inArr[l-1] == 0x00)
-                                               l--;
                                        if (l > 0) {
+                                               while (inArr[l-1] == 0x00)
+                                                       l--;
                                                byte[] c = new byte [l];
                                                Buffer.BlockCopy (inArr, 0, c, 0, l);
                                                sb.Append (Convert.ToBase64String (c));