Add docs for mbedtls_ct_memcmp_partial test

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2023-09-19 17:48:13 +01:00
parent 28bc1ab923
commit 2c9f86b3b6

View File

@ -260,6 +260,17 @@ exit:
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_NIST_KW_C */
/**
* Generate two arrays of the given size, and test mbedtls_ct_memcmp_partial
* over them. The arrays will be identical, except that one byte may be specified
* to be different.
*
* \p diff Index of byte that differs (if out of range, the arrays will match).
* \p size Size of arrays to compare
* \p skip_head Leading bytes to skip, as per mbedtls_ct_memcmp_partial
* \p skip_tail Trailing bytes to skip, as per mbedtls_ct_memcmp_partial
*/
void mbedtls_ct_memcmp_partial(int diff, int size, int skip_head, int skip_tail)
{
uint8_t *a = NULL, *b = NULL;