[Mono-dev] Correction to System.Security.Cryptography.Rfc2898DeriveBytes.cs

Sebastien Pouliot sebastien.pouliot at gmail.com
Thu Mar 15 13:09:48 EDT 2007


On Thu, 2007-03-15 at 09:18 -0700, Roei Erez wrote:
> Hello,
> The method 'private byte[] F (byte[] s, int c, int i)'  uses
> BitConverter.GetBytes(int num).
> This usage is machine dependant, which depends on if the machine works
> as big endian or little endian..
> I think, althogh not sure, that the better way is to use
> BitConverterLE.GetBytes(int num) or calculate the bytes manually using
> bitwise operations.
> Attached is a patch for this.
> Do you agree?

Make sense, but please wait before committing the fix (unless you have
unit tests that trigger this condition). I'll look at the source ASAP.

Thanks
-- 
Sebastien Pouliot  <sebastien at ximian.com>
Blog: http://pages.infinit.net/ctech/




More information about the Mono-devel-list mailing list