SymmetricAlgorithm generates erratic results
Hi all,
I am using the default implementation of the SymmetricAlgorithm class (RijndaelManaged) to encrypt and decrypt files.
I am passing the files into my methods as a byte[], and returning a byte[]. I first ran into problems because the CryptoStream object was only writing in blocks, hence truncating my files. I've solved that
so my files are the correct lengths, but I am getting erratic failures. For example, I just encypted and decrypted
three pdf files. One opened with errors, one would not open at all (message said it was corrupt), and
one opened prefectly without any problem.
Any ideas on what could cause such erratic results?