IDRijndael ID = new IDRijndael();
Rijndael myRijndael = Rijndael.Create();
byte[] encrypted = ID.EncryptStringToBytes("123456", myRijndael.Key, myRijndael.IV);
string roundtrip =ID.DecryptStringFromBytes(encrypted, myRijndael.Key, myRijndael.IV);
TextBox1.Text = encrypted.ToString();//加密后的密码
TextBox2.Text = roundtrip;//密码还原,即为123456