2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Wed, 28 Mar 2007 17:51:09 +0000 (17:51 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Wed, 28 Mar 2007 17:51:09 +0000 (17:51 -0000)
* RIPEMD160Managed.cs: Fix endian issue (take good code path).

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

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

index c4907f1b136fb873e70e656e1af7ba43f55323af..9361a5338502ff985062b079420ce213d170a3c6 100644 (file)
@@ -1,3 +1,7 @@
+2007-03-28  Sebastien Pouliot  <sebastien@ximian.com> 
+
+       * RIPEMD160Managed.cs: Fix endian issue (take good code path).
+
 2007-03-22  Sebastien Pouliot  <sebastien@ximian.com> 
 
        * CryptoConfig.cs: Names are case-insensitive only since fx 2.0.
index 9216488d5babcd601bb1053c018de69961379b31..750485d80ce45e333ba2d0832f5e2b4569ceb94b 100644 (file)
@@ -109,7 +109,7 @@ namespace System.Security.Cryptography {
                protected override byte[] HashFinal() {
                        CompressFinal(_Length);
                        byte[] hash = new byte[20];
-                       if (BitConverter.IsLittleEndian) {
+                       if (!BitConverter.IsLittleEndian) {
                                for (int i = 0; i < 5; i++) {
                                        for (int j = 0; j < 4; j++) {
                                                hash [i*4+j] = (byte)(_HashValue [i] >> j*8);
@@ -134,7 +134,7 @@ namespace System.Security.Cryptography {
                /// <param name="offset">The offset in the buffer.</param>
                private void ProcessBlock (byte[] buffer, int offset)
                {
-                       if (BitConverter.IsLittleEndian) {
+                       if (!BitConverter.IsLittleEndian) {
                                for (int i=0; i < _X.Length; i++) {
                                        _X [i] = (uint)(buffer [offset])
                                                | (((uint)(buffer [offset+1])) <<  8)