You should be using the CryptoStream object, which will automatically call the correct ICryptoTransform.TransformFinalBlock
and ICryptoTransform.TransformBlock
methods.
You haven't posted the encryption code but check that the Padding mode the same (i.e. PaddingMode.PKCS7
) and the initiation vector is set to the same string.