Rename hash test driver functions to match auto-naming scheme
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
diff --git a/library/psa_crypto_driver_wrappers.c b/library/psa_crypto_driver_wrappers.c
index 7bb0185..97e4ee8 100644
--- a/library/psa_crypto_driver_wrappers.c
+++ b/library/psa_crypto_driver_wrappers.c
@@ -1084,7 +1084,7 @@
/* Try accelerators first */
#if defined(PSA_CRYPTO_DRIVER_TEST)
- status = test_transparent_hash_compute( alg, input, input_length,
+ status = mbedtls_transparent_test_driver_hash_compute( alg, input, input_length,
hash, hash_size, hash_length );
if( status != PSA_ERROR_NOT_SUPPORTED )
return( status );
@@ -1116,7 +1116,7 @@
/* Try setup on accelerators first */
#if defined(PSA_CRYPTO_DRIVER_TEST)
- status = test_transparent_hash_setup( &operation->ctx.test_ctx, alg );
+ status = mbedtls_transparent_test_driver_hash_setup( &operation->ctx.test_ctx, alg );
if( status == PSA_SUCCESS )
operation->id = PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID;
@@ -1149,7 +1149,7 @@
#if defined(PSA_CRYPTO_DRIVER_TEST)
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
target_operation->id = PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID;
- return( test_transparent_hash_clone( &source_operation->ctx.test_ctx,
+ return( mbedtls_transparent_test_driver_hash_clone( &source_operation->ctx.test_ctx,
&target_operation->ctx.test_ctx ) );
#endif
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
@@ -1174,7 +1174,7 @@
{
#if defined(PSA_CRYPTO_DRIVER_TEST)
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
- return( test_transparent_hash_update( &operation->ctx.test_ctx,
+ return( mbedtls_transparent_test_driver_hash_update( &operation->ctx.test_ctx,
input, input_length ) );
#endif
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
@@ -1200,7 +1200,7 @@
{
#if defined(PSA_CRYPTO_DRIVER_TEST)
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
- return( test_transparent_hash_finish( &operation->ctx.test_ctx,
+ return( mbedtls_transparent_test_driver_hash_finish( &operation->ctx.test_ctx,
hash, hash_size, hash_length ) );
#endif
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
@@ -1225,7 +1225,7 @@
{
#if defined(PSA_CRYPTO_DRIVER_TEST)
case PSA_CRYPTO_TRANSPARENT_TEST_DRIVER_ID:
- return( test_transparent_hash_abort( &operation->ctx.test_ctx ) );
+ return( mbedtls_transparent_test_driver_hash_abort( &operation->ctx.test_ctx ) );
#endif
#if defined(MBEDTLS_PSA_BUILTIN_HASH)
case PSA_CRYPTO_MBED_TLS_DRIVER_ID:
diff --git a/library/psa_crypto_driver_wrappers_contexts.h b/library/psa_crypto_driver_wrappers_contexts.h
index 8cc21a2..8db55c9 100644
--- a/library/psa_crypto_driver_wrappers_contexts.h
+++ b/library/psa_crypto_driver_wrappers_contexts.h
@@ -46,7 +46,7 @@
unsigned dummy; /* Make sure this structure is always non-empty */
mbedtls_psa_hash_operation_t mbedtls_ctx;
#if defined(PSA_CRYPTO_DRIVER_TEST)
- test_transparent_hash_operation_t test_ctx;
+ mbedtls_transparent_test_driver_hash_operation_t test_ctx;
#endif
} psa_driver_hash_context_t;
diff --git a/library/psa_crypto_hash.c b/library/psa_crypto_hash.c
index 9a9dd09..b573c7a 100644
--- a/library/psa_crypto_hash.c
+++ b/library/psa_crypto_hash.c
@@ -541,7 +541,7 @@
}
#endif /* INCLUDE_HASH_TEST_DRIVER */
-psa_status_t test_transparent_hash_compute(
+psa_status_t mbedtls_transparent_test_driver_hash_compute(
psa_algorithm_t alg,
const uint8_t *input,
size_t input_length,
@@ -566,8 +566,8 @@
#endif
}
-psa_status_t test_transparent_hash_setup(
- test_transparent_hash_operation_t *operation,
+psa_status_t mbedtls_transparent_test_driver_hash_setup(
+ mbedtls_transparent_test_driver_hash_operation_t *operation,
psa_algorithm_t alg )
{
#if defined(INCLUDE_HASH_TEST_DRIVER)
@@ -582,9 +582,9 @@
#endif
}
-psa_status_t test_transparent_hash_clone(
- const test_transparent_hash_operation_t *source_operation,
- test_transparent_hash_operation_t *target_operation )
+psa_status_t mbedtls_transparent_test_driver_hash_clone(
+ const mbedtls_transparent_test_driver_hash_operation_t *source_operation,
+ mbedtls_transparent_test_driver_hash_operation_t *target_operation )
{
#if defined(INCLUDE_HASH_TEST_DRIVER)
if( is_hash_accelerated( source_operation->operation.alg ) == PSA_SUCCESS )
@@ -599,8 +599,8 @@
#endif
}
-psa_status_t test_transparent_hash_update(
- test_transparent_hash_operation_t *operation,
+psa_status_t mbedtls_transparent_test_driver_hash_update(
+ mbedtls_transparent_test_driver_hash_operation_t *operation,
const uint8_t *input,
size_t input_length )
{
@@ -618,8 +618,8 @@
#endif
}
-psa_status_t test_transparent_hash_finish(
- test_transparent_hash_operation_t *operation,
+psa_status_t mbedtls_transparent_test_driver_hash_finish(
+ mbedtls_transparent_test_driver_hash_operation_t *operation,
uint8_t *hash,
size_t hash_size,
size_t *hash_length )
@@ -639,8 +639,8 @@
#endif
}
-psa_status_t test_transparent_hash_abort(
- test_transparent_hash_operation_t *operation )
+psa_status_t mbedtls_transparent_test_driver_hash_abort(
+ mbedtls_transparent_test_driver_hash_operation_t *operation )
{
#if defined(INCLUDE_HASH_TEST_DRIVER)
return( mbedtls_psa_hash_abort( &operation->operation ) );
diff --git a/library/psa_crypto_hash.h b/library/psa_crypto_hash.h
index ed528ab..7d52624 100644
--- a/library/psa_crypto_hash.h
+++ b/library/psa_crypto_hash.h
@@ -278,9 +278,9 @@
#if defined(PSA_CRYPTO_DRIVER_TEST)
typedef struct {
mbedtls_psa_hash_operation_t operation;
-} test_transparent_hash_operation_t;
+} mbedtls_transparent_test_driver_hash_operation_t;
-psa_status_t test_transparent_hash_compute(
+psa_status_t mbedtls_transparent_test_driver_hash_compute(
psa_algorithm_t alg,
const uint8_t *input,
size_t input_length,
@@ -288,27 +288,27 @@
size_t hash_size,
size_t *hash_length);
-psa_status_t test_transparent_hash_setup(
- test_transparent_hash_operation_t *operation,
+psa_status_t mbedtls_transparent_test_driver_hash_setup(
+ mbedtls_transparent_test_driver_hash_operation_t *operation,
psa_algorithm_t alg );
-psa_status_t test_transparent_hash_clone(
- const test_transparent_hash_operation_t *source_operation,
- test_transparent_hash_operation_t *target_operation );
+psa_status_t mbedtls_transparent_test_driver_hash_clone(
+ const mbedtls_transparent_test_driver_hash_operation_t *source_operation,
+ mbedtls_transparent_test_driver_hash_operation_t *target_operation );
-psa_status_t test_transparent_hash_update(
- test_transparent_hash_operation_t *operation,
+psa_status_t mbedtls_transparent_test_driver_hash_update(
+ mbedtls_transparent_test_driver_hash_operation_t *operation,
const uint8_t *input,
size_t input_length );
-psa_status_t test_transparent_hash_finish(
- test_transparent_hash_operation_t *operation,
+psa_status_t mbedtls_transparent_test_driver_hash_finish(
+ mbedtls_transparent_test_driver_hash_operation_t *operation,
uint8_t *hash,
size_t hash_size,
size_t *hash_length );
-psa_status_t test_transparent_hash_abort(
- test_transparent_hash_operation_t *operation );
+psa_status_t mbedtls_transparent_test_driver_hash_abort(
+ mbedtls_transparent_test_driver_hash_operation_t *operation );
#endif /* PSA_CRYPTO_DRIVER_TEST */