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

Roei Erez roeie at mainsoft.com
Thu Mar 15 12:18:22 EDT 2007


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070315/bb9db09c/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rfc2898DeriveBytes.cs.diff
Type: application/octet-stream
Size: 663 bytes
Desc: Rfc2898DeriveBytes.cs.diff
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070315/bb9db09c/attachment.obj 


More information about the Mono-devel-list mailing list