PasswordDeriveBytes in .NET 2.0 Beta

christian.benien_at_gmail.com
Date: 05/14/05

  • Next message: William Stacey [MVP]: "Re: PasswordDeriveBytes in .NET 2.0 Beta"
    Date: 14 May 2005 05:50:27 -0700
    
    

    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


  • Next message: William Stacey [MVP]: "Re: PasswordDeriveBytes in .NET 2.0 Beta"