I am trying to generate a key using the .net 2.0 PasswordDeriveBytes class.
PasswordDeriveBytes pdb = new PasswordDeriveBytes("blahblahblah",null);
byte[] iv = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 };
byte[] key = pdb.CryptDeriveKey("TripleDES", "SHA1", 128, iv);
The code throws "CryptographicException: Invalid flags specified." when trying to execute the CryptDeriveKey method above. I'm trying to encrypt a database entry in asp.net and this is my first shot a crypto. I'd appreciate any help.