I am working on a base encryption method. I am using RijndaelManaged. I got this code from somewhere a long time ago, but can\'t remember where.
I had my code workin
You should be able to check how many bytes the IV needs to be using:
algorithm.BlockSize / 8
BlockSize is in bits, so 128 bits / 8 gives 16 bytes of ASCII, and you may also find Rfc2898DeriveBytes a useful class for producing keys.
algorithm.IV = rfc2898DeriveBytesForIV.GetBytes(algorithm.BlockSize / 8);
Hope it helps.