I'm trying to update my encrypt decrypt function from DES to TripleDES. However, when I try to increase my key and iv byte array size from 8 to 128:
byte[] key = new byte[128], iv = new byte[128];
TripleDESCryptoServiceProvider des = new TripleDESCryptoServiceProvider();
Where 8 was used for DESCryptoServiceProvider and 128 is now used for TripleDESCryptoServiceProvider I always get the same error:
Specified key is not a valid size for this algorithm.
Even though my byte arrays are complete filled in.
What am I doing wrong? Is there any requirement besides the length to allow my key and iv to be used to create an Encryptor?