Used by the cipher to pad the last block of input text.
Possible ValuesNone (1)
PaddingMode is used by the cipher to pad the final input block to guarantee that it is the correct size required for the cipher's input. Each mode pads the data differently:
|None||No padding will be performed.|
|PKCS7||The data is padded with by a series of bytes that are each equal to the number of bytes used (eg: 03 03 03)|
|Zeros||The data is padded by several null bytes (eg: 00 00 00).|
|ANSIX923||The data is padded by a sequence of null bytes followed by the number of bytes in the padding.|
|ISO10126||The data is padded by a sequence of random bytes followed by the number of bytes in the padding.|
Note: unless the length of input is an exact multiple of the cipher's input block size (16 bytes for AES), the final block of plaintext may be lost if None is used. In order to avoid this, the default PaddingMode is PKCS7.