| Updated: October 28, 2024 |
Apply PKCS7 padding
#include <qcrypto/qcrypto.h>
int qcrypto_padding_pkcs7_pad(const uint8_t *data,
size_t size,
uint8_t *paddata,
size_t *padsize,
size_t blocksize)
This function pads data using the specified algorithm. The size of paddata needs to include the correct amount of space for the padding. See qcrypto_padding_pkcs7_size() to calculate the required amount.
QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.