qcrypto_padding_pkcs7_unpad()

Updated: May 06, 2022

Remove PKCS7 padding

Synopsis:

#include <qcrypto/qcrypto.h>
int qcrypto_padding_pkcs7_unpad(uint8_t *data,
                                size_t *size)

Arguments:

data
The data buffer.
size
The combined size of the data buffer and the unpadded data.

Library:

libqcrypto

Description:

This function verifies the padding integrity and removes it from the input data by setting the unpadded length to size on success.

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.