mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Document assumption of mbedtls_get_pkcs_padding
Point out that the input length must be the same as the cipher's block size. Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
@ -839,6 +839,11 @@ static void add_pkcs_padding(unsigned char *output, size_t output_len,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the length of the PKCS7 padding.
|
||||||
|
*
|
||||||
|
* Note: input_len must be the block size of the cipher.
|
||||||
|
*/
|
||||||
MBEDTLS_STATIC_TESTABLE int mbedtls_get_pkcs_padding(unsigned char *input,
|
MBEDTLS_STATIC_TESTABLE int mbedtls_get_pkcs_padding(unsigned char *input,
|
||||||
size_t input_len,
|
size_t input_len,
|
||||||
size_t *data_len)
|
size_t *data_len)
|
||||||
|
Reference in New Issue
Block a user