Simplify implementation of MD<->PSA translation

Also, add tests and comments due from previous commits.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard
2023-06-06 12:34:45 +02:00
parent 47bb380f6d
commit 1f6d2e352d
4 changed files with 39 additions and 36 deletions

View File

@@ -143,7 +143,9 @@ extern "C" {
* stronger message digests instead.
*
*/
/* XXX: comment + test */
/* Note: these are aligned with the definitions of PSA_ALG_ macros for hashes,
* in order to enable an efficient implementation of conversion functions.
* This is tested by md_to_from_psa() in test_suite_md. */
typedef enum {
MBEDTLS_MD_NONE=0, /**< None. */
MBEDTLS_MD_MD5=0x03, /**< The MD5 message digest. */