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 <thomas.daubney@arm.com>
diff --git a/programs/psa/psa_hash.c b/programs/psa/psa_hash.c
index 9cd5a3e..5c565db 100644
--- a/programs/psa/psa_hash.c
+++ b/programs/psa/psa_hash.c
@@ -60,7 +60,7 @@
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 @@
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 @@
/* 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);