mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-04 21:56:21 +01:00
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:
parent
eab4a7a05d
commit
a0c9ff3e52
15 changed files with 101 additions and 101 deletions
|
|
@ -33,12 +33,12 @@ void mbedtls_chachapoly_enc( char *hex_key_string, char *hex_nonce_string, char
|
|||
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 @@ void mbedtls_chachapoly_dec( char *hex_key_string, char *hex_nonce_string, char
|
|||
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 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue