J
Jeff
hi
asp.net 3.5
This code below gives this error:
Specified initialization vector (IV) does not match the block size for this
algorithm.
byte[] initVectorBytes = Encoding.ASCII.GetBytes("1234567890");
byte[] secretkey =
Encoding.ASCII.GetBytes("12345678901234567890123456789012");
RijndaelManaged symmetricKey = new RijndaelManaged();
symmetricKey.Mode = CipherMode.CBC;
symmetricKey.BlockSize = 128;
symmetricKey.KeySize = 256;
ICryptoTransform encryptor = symmetricKey.CreateEncryptor(secretkey,
initVectorBytes);
I wonder how many bytes the initialization vector should have. I've tried 32
bytes (the same as the key, without any luck)
any suggestions?
asp.net 3.5
This code below gives this error:
Specified initialization vector (IV) does not match the block size for this
algorithm.
byte[] initVectorBytes = Encoding.ASCII.GetBytes("1234567890");
byte[] secretkey =
Encoding.ASCII.GetBytes("12345678901234567890123456789012");
RijndaelManaged symmetricKey = new RijndaelManaged();
symmetricKey.Mode = CipherMode.CBC;
symmetricKey.BlockSize = 128;
symmetricKey.KeySize = 256;
ICryptoTransform encryptor = symmetricKey.CreateEncryptor(secretkey,
initVectorBytes);
I wonder how many bytes the initialization vector should have. I've tried 32
bytes (the same as the key, without any luck)
any suggestions?