Setting a Key Mode and Padding
You can set the key mode and padding for a symmetric key (AES or DESede).
To set the key padding:
key.Padding = PaddingMode.PKCS7;
To set the key mode:
key.Mode = CipherMode.CBC;
These values are stored until the program exits. Whenever you access the key, the values stored in the memory are used, unless you override them.