From 5da746e517754bab86f0feaeb8b3226effd60e34 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Wed, 28 Mar 2007 17:51:09 +0000 Subject: [PATCH] 2007-03-28 Sebastien Pouliot * RIPEMD160Managed.cs: Fix endian issue (take good code path). svn path=/trunk/mcs/; revision=75092 --- mcs/class/corlib/System.Security.Cryptography/ChangeLog | 4 ++++ .../corlib/System.Security.Cryptography/RIPEMD160Managed.cs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mcs/class/corlib/System.Security.Cryptography/ChangeLog b/mcs/class/corlib/System.Security.Cryptography/ChangeLog index c4907f1b136..9361a533850 100644 --- a/mcs/class/corlib/System.Security.Cryptography/ChangeLog +++ b/mcs/class/corlib/System.Security.Cryptography/ChangeLog @@ -1,3 +1,7 @@ +2007-03-28 Sebastien Pouliot + + * RIPEMD160Managed.cs: Fix endian issue (take good code path). + 2007-03-22 Sebastien Pouliot * CryptoConfig.cs: Names are case-insensitive only since fx 2.0. diff --git a/mcs/class/corlib/System.Security.Cryptography/RIPEMD160Managed.cs b/mcs/class/corlib/System.Security.Cryptography/RIPEMD160Managed.cs index 9216488d5ba..750485d80ce 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RIPEMD160Managed.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RIPEMD160Managed.cs @@ -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 { /// The offset in the buffer. 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) -- 2.25.1