tests: Add mbedtls_test_ prefix to *hexify functions

Add mbedtls_test_ prefix to hexify() and unhexify()
test helper functions.

Command to change *.function files:
find . -name "*.function" -exec awk -i inplace \
    '{sub(/(un|)hexify\>/,"mbedtls_test_&")}1' {} \;

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron
2020-06-08 17:05:57 +02:00
parent eab4a7a05d
commit a0c9ff3e52
15 changed files with 101 additions and 101 deletions

View File

@@ -1087,15 +1087,15 @@ void test_vec_crypt( int cipher_id, int operation, char *hex_key,
TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx,
mbedtls_cipher_info_from_type( cipher_id ) ) );
key_len = unhexify( key, hex_key );
inputlen = unhexify( input, hex_input );
resultlen = unhexify( result, hex_result );
key_len = mbedtls_test_unhexify( key, hex_key );
inputlen = mbedtls_test_unhexify( input, hex_input );
resultlen = mbedtls_test_unhexify( result, hex_result );
TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx, key, 8 * key_len, operation ) );
if( MBEDTLS_MODE_CBC == ctx.cipher_info->mode )
TEST_ASSERT( 0 == mbedtls_cipher_set_padding_mode( &ctx, MBEDTLS_PADDING_NONE ) );
iv_len = unhexify( iv, hex_iv );
iv_len = mbedtls_test_unhexify( iv, hex_iv );
TEST_ASSERT( finish_result == mbedtls_cipher_crypt( &ctx, iv_len ? iv : NULL,
iv_len, input, inputlen,