PKCS7Pad is an implementation of the PKCS7 block cipher padding scheme. A incomplete block will be padded with bytes like this:
01 02 02 03 03 03 04 04 04 04 ...
The block to be padded can't be full.
Standard: rfc5652, http://tools.ietf.org/html/rfc5652#section-6.3
pad with zeros or random bytes if SecureRandom is specified in constructor.
PKCS7Pad pad; ubyte[16] block; block[0..2] = [1,2]; // block contains 2 bytes pad.addPadding(block, 2); // fill the rest with padding bytes assert(pad.padCount(block) == 2);
See Implementation
PKCS7Pad is an implementation of the PKCS7 block cipher padding scheme. A incomplete block will be padded with bytes like this:
01 02 02 03 03 03 04 04 04 04 ...
The block to be padded can't be full.
Standard: rfc5652, http://tools.ietf.org/html/rfc5652#section-6.3