Hi,
I'm developing an application that sends information over the internet to other applications (which are not written in .NET). We decided to use Rijndael encryption for this. But we can't create the same key at both sides...
This is the code that generates the key in .NET
// this should be random and should be send with the encrypted data
byte[] salt = new byte[] {0, 1, 2, 3, 4, 5, 6, 7};
System.Security.Cryptography.PasswordDeriveBytes pwd;
pwd = new System.Security.Cryptography.PasswordDeriveBytes("password", salt);
pwd.IterationCount = 1; // we've tried this with the values 0 to 10000
pwd.HashName = "System.Security.Cryptography.SHA256Managed";
byte[] key = pwd.GetBytes(32);
But I can't generate the same key at the other side because we've got no idea how the .NET framework uses the Salt. Does anyone knows how we can generate the same result without the PasswordDeriveBytes class?
Thanks,
Coen