From 6fc4ca2d858162d2da5fb58404fb8183f00a3ca6 Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Fri, 28 Jul 2023 14:31:06 +0100 Subject: [PATCH] Replace hash_size with hash_length This is to make the variable naming covnention align with the PSA API documentation. Signed-off-by: Thomas Daubney --- programs/psa/psa_hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/psa/psa_hash.c b/programs/psa/psa_hash.c index 9cd5a3e007..5c565db2ee 100644 --- a/programs/psa/psa_hash.c +++ b/programs/psa/psa_hash.c @@ -60,7 +60,7 @@ int main(void) uint8_t buf[] = "Hello World!"; psa_status_t status; uint8_t hash[PSA_HASH_LENGTH(HASH_ALG)]; - size_t hash_size; + size_t hash_length; psa_hash_operation_t psa_hash_operation = PSA_HASH_OPERATION_INIT; psa_hash_operation_t cloned_psa_hash_operation = PSA_HASH_OPERATION_INIT; @@ -100,7 +100,7 @@ int main(void) return EXIT_FAILURE; } - status = psa_hash_finish(&psa_hash_operation, hash, sizeof(hash), &hash_size); + status = psa_hash_finish(&psa_hash_operation, hash, sizeof(hash), &hash_length); if (status != PSA_SUCCESS) { mbedtls_printf("psa_hash_finish failed\n"); psa_hash_abort(&psa_hash_operation); @@ -122,12 +122,12 @@ int main(void) /* Compute hash using one-shot function call */ memset(hash, 0, sizeof(hash)); - hash_size = 0; + hash_length = 0; status = psa_hash_compute(HASH_ALG, buf, sizeof(buf), hash, sizeof(hash), - &hash_size); + &hash_length); if (status != PSA_SUCCESS) { mbedtls_printf("psa_hash_compute failed\n"); psa_hash_abort(&psa_hash_operation);