I created the following class, based from the examples on MSDN: https://gist.github.com/anonymous/19d9e5f6747dfe75d553
Whenever I use it like this, it seems like it encrypts fine:
var key = Crypto.GenerateKey();
var vector = Crypto.GenerateVector(key);
var cypherText = Crypto.EncryptBase64("abcdefghijklmnopqrstuvwxyz1234567890", key, vector);
vector = Crypto.GenerateVector(key);
var plainText = Crypto.Decrypt(cypherText, key, vector);
Then plainText
contains the following:
�\aU��(���P\u0003�b\u001dxqrstuvwxyz1234567890
So it seems changing the IV, doesn't really do anything (especially on longer documents). Why do we even need an IV?