TripleDESCryptoServiceProvider defaults to using PKCS7-padding. This pads any message to the next multiple of the block-size.
To avoid using padding, just set the Padding
-property to PaddingMode.None
new TripleDESCryptoServiceProvider {
KeySize = keySizeInBits,
Padding = PaddingMode.None
};
Rasmus Faber
2009-04-20 08:41:15