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>
diff --git a/tests/suites/test_suite_chachapoly.function b/tests/suites/test_suite_chachapoly.function
index 8e56bf6..aeaf1d74 100644
--- a/tests/suites/test_suite_chachapoly.function
+++ b/tests/suites/test_suite_chachapoly.function
@@ -33,12 +33,12 @@
memset( output_str, 0x00, sizeof( output_str ) );
memset( mac_str, 0x00, sizeof( mac_str ) );
- aad_len = unhexify( aad_str, hex_aad_string );
- input_len = unhexify( input_str, hex_input_string );
- output_len = unhexify( output_str, hex_output_string );
- key_len = unhexify( key_str, hex_key_string );
- nonce_len = unhexify( nonce_str, hex_nonce_string );
- mac_len = unhexify( mac_str, hex_mac_string );
+ aad_len = mbedtls_test_unhexify( aad_str, hex_aad_string );
+ input_len = mbedtls_test_unhexify( input_str, hex_input_string );
+ output_len = mbedtls_test_unhexify( output_str, hex_output_string );
+ key_len = mbedtls_test_unhexify( key_str, hex_key_string );
+ nonce_len = mbedtls_test_unhexify( nonce_str, hex_nonce_string );
+ mac_len = mbedtls_test_unhexify( mac_str, hex_mac_string );
TEST_ASSERT( key_len == 32 );
TEST_ASSERT( nonce_len == 12 );
@@ -87,12 +87,12 @@
memset( output_str, 0x00, sizeof( output_str ) );
memset( mac_str, 0x00, sizeof( mac_str ) );
- aad_len = unhexify( aad_str, hex_aad_string );
- input_len = unhexify( input_str, hex_input_string );
- output_len = unhexify( output_str, hex_output_string );
- key_len = unhexify( key_str, hex_key_string );
- nonce_len = unhexify( nonce_str, hex_nonce_string );
- mac_len = unhexify( mac_str, hex_mac_string );
+ aad_len = mbedtls_test_unhexify( aad_str, hex_aad_string );
+ input_len = mbedtls_test_unhexify( input_str, hex_input_string );
+ output_len = mbedtls_test_unhexify( output_str, hex_output_string );
+ key_len = mbedtls_test_unhexify( key_str, hex_key_string );
+ nonce_len = mbedtls_test_unhexify( nonce_str, hex_nonce_string );
+ mac_len = mbedtls_test_unhexify( mac_str, hex_mac_string );
TEST_ASSERT( key_len == 32 );
TEST_ASSERT( nonce_len == 12 );