These functions add and remove padding according to the convention in PKCS#5, PKCS#7 and CMS - see Padding for more details. The outputs from the padding functions are always longer than the input, and the outputs from the 'Unpad' functions are always shorter. The 'Unpad' functions return a "decryption error" if the padding is not valid.
PAD_BytesBlock
PAD_UnpadBytes
PAD_HexBlock
PAD_UnpadHex