|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
PasswordDeriveBytes in .NET 2.0 BetaI'm trying to run our .NET 1.1 code on the beta version of .NET 2.0.
Almost everything runs fine, however there's one small issue: The following code is used to encrypt some data, the Key and IV are derived with PasswordDeriveBytes. 'salt' is a byte array with length 256 (identical in both CLRs of course) PasswordDeriveBytes kg = new PasswordDeriveBytes("test", salt); byte[] key = kg.GetBytes(32); byte[] iv = kg.GetBytes(16); The key I get is identical in both CLRs (1.1.4322.2032 and 2.0.50215.44), but the second array 'iv' is different. Does anyone know why that happens? Thanks a lot, Christian I think I recall seeing on bug on this very issue. Think it is fixed in
next beta. -- Show quoteHide quoteWilliam Stacey [MVP] <christian.ben***@gmail.com> wrote in message news:1116075027.397849.99580@g43g2000cwa.googlegroups.com... > I'm trying to run our .NET 1.1 code on the beta version of .NET 2.0. > Almost everything runs fine, however there's one small issue: > > The following code is used to encrypt some data, the Key and IV are > derived with PasswordDeriveBytes. 'salt' is a byte array with length > 256 (identical in both CLRs of course) > > PasswordDeriveBytes kg = new PasswordDeriveBytes("test", salt); > byte[] key = kg.GetBytes(32); > byte[] iv = kg.GetBytes(16); > > The key I get is identical in both CLRs (1.1.4322.2032 and > 2.0.50215.44), but the second array 'iv' is different. > > Does anyone know why that happens? > > Thanks a lot, > Christian >
Other interesting topics
Basic question about Public Private Key Pairs
ASP.NET Uploading Security Issue? Distributed winforms application security system.security.securityexception WindowsIdentity role caching in ASP.NET Check for certian privileges How to protect data in executable file? High-strength crypto problems IsInRole groupname with white space. Possible security error loading an Xsl? |
|||||||||||||||||||||||