pkcs7 constant

_PKCS7Padding const pkcs7

Padding is in whole bytes. The value of each added byte is the number of bytes that are added. If the input size is already a multiple of the block size, an extra block of padding is added.

It is described in RFC-5652 a.k.a. Cryptographic Message Syntax (CMS)

Limitation: Maximum block size must be less than 256 bytes

Example:

4-bytes message to 8-bytes block:

... | FA 3D E6 61 |
... | FA 3D E6 61 04 04 04 04 |
                  ** -- -- -- |

Implementation

static const pkcs7 = _PKCS7Padding();