Try flushing your streams before converting them to arrays - it's quite possible you have data "waiting" to fill an encryption block that you aren't getting before you transfer it.
Here is the method I use:
public void Encrypt(Stream sIn, Stream sOut)
{
string Routine = "Encrypt: ";
if (key == null)
{
throw new CryptoHelperException(Routine, EX_CRYPTO_NOKEY);
}
if (sIn.Length > int.MaxValue)
{
throw new CryptoHelperException(Routine, EX_CRYPTO_TOOBIG);
}
sOut.Write(CreateBlockHeader(sIn), 0, encAlg.BlockSize);
int inputLength;
byte[] abIn;
switch ((CryptoSecurity) schema )
{
case CryptoSecurity.NoEncrypt:
inputLength = (int) sIn.Length;
abIn = new byte[inputLength];
sIn.Read(abIn, 0, inputLength);
sOut.Write(abIn, 0, inputLength);
break;
case CryptoSecurity.TripleDES:
CryptoStream encrypt = new CryptoStream(sOut, encAlg.CreateEncryptor(), CryptoStreamMode.Write);
inputLength = (int)sIn.Length + encAlg.BlockSize;
abIn = new byte[inputLength];
sIn.Read(abIn, 0, inputLength);
encrypt.Write(abIn, 0, inputLength);
encrypt.FlushFinalBlock();
key.Reset();
break;
default:
throw new CryptoHelperException(Routine, EX_CRYPTO_BADSCHEMA);
}
if (sIn.CanSeek)
{
sIn.Seek(0, SeekOrigin.Begin);
}
if (sOut.CanSeek)
{
sOut.Seek(0, SeekOrigin.Begin);
}
}
It uses AES rather than Rijndael but the principle is the same.