Add self tests (taken from #1549).

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-05-20 20:42:33 +02:00
parent 13acb1b987
commit 7dbd5d1760
5 changed files with 354 additions and 0 deletions

View File

@@ -183,6 +183,17 @@ int mbedtls_sha3( mbedtls_sha3_id id, const uint8_t *input,
uint8_t *output,
size_t olen );
#if defined(MBEDTLS_SELF_TEST)
/**
* \brief Checkup routine for the algorithms implemented
* by this module: SHA3-224, SHA3-256, SHA3-384, SHA3-512,
* SHAKE128, SHAKE256, cSHAKE128 and cSHAKE256.
*
* \return 0 if successful, or 1 if the test failed.
*/
int mbedtls_sha3_self_test( int verbose );
#endif /* MBEDTLS_SELF_TEST */
#ifdef __cplusplus
}
#endif