1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Move test driver hash function declarations to software driver

Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
Steven Cooreman
2021-03-08 16:16:53 +01:00
parent 4f7d0586e1
commit d029b60770
4 changed files with 41 additions and 71 deletions

View File

@ -271,4 +271,45 @@ psa_status_t mbedtls_psa_hash_finish(
psa_status_t mbedtls_psa_hash_abort(
mbedtls_psa_hash_operation_t *operation );
/*
* BEYOND THIS POINT, TEST DRIVER ENTRY POINTS ONLY.
*/
#if defined(PSA_CRYPTO_DRIVER_TEST)
typedef struct {
mbedtls_psa_hash_operation_t operation;
} test_transparent_hash_operation_t;
psa_status_t test_transparent_hash_compute(
psa_algorithm_t alg,
const uint8_t *input,
size_t input_length,
uint8_t *hash,
size_t hash_size,
size_t *hash_length);
psa_status_t test_transparent_hash_setup(
test_transparent_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 test_transparent_hash_update(
test_transparent_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,
uint8_t *hash,
size_t hash_size,
size_t *hash_length );
psa_status_t test_transparent_hash_abort(
test_transparent_hash_operation_t *operation );
#endif /* PSA_CRYPTO_DRIVER_TEST */
#endif /* PSA_CRYPTO_HASH_H */