TripleDESCryptoServiceProvider

Jun 16 2004 5:34 PM
Even though I 'm passing in the same key and IV for the two TripleDESCryptoServiceProvider's I'm getting a different outpu string in the MessageBox.Show. Can anyone explain why the values are differnt? string ss = ""; for(int i =0; i < 32; i++) ss+="m"; TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider(); tdes.CreateEncryptor(Convert.FromBase64String(ss),Convert.FromBase64String(ss)); //THIS DOES NOT OUTPUT THE SAME STRING AS THE MESSAGE BOX BELOW? MessageBox.Show(Convert.ToBase64String(tdes.Key)); TripleDESCryptoServiceProvider tdes1 = new TripleDESCryptoServiceProvider(); tdes1.CreateEncryptor(Convert.FromBase64String(ss),Convert.FromBase64String(ss)); //THE OUTPUT IS DIFFENENT FROM THE ONE ABOVE EVEN THOUGH THE SAME KEY AND IV ARE USED MessageBox.Show(Convert.ToBase64String(tdes1.Key));