C# Rijndael decryption returns extra question mark character
问题 I am organizing some very basic symmetric encryption/decryption codes in a class for future use. I am able to encrypt and decrypt successfully... only with a small problem. Here is my code that reads in from a stream and en/decrypt to another stream: public void Encrypt(Stream input, Stream output) { byte[] key = Encoding.UTF8.GetBytes(_pw); byte[] iv = Encoding.UTF8.GetBytes(GenerateInitVector()); RijndaelManaged rm = new RijndaelManaged(); CryptoStream cs = new CryptoStream( output, rm