mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-05 22:19:11 +01:00
tests: suites: Remove hex in name of variables of type data_t
Remove `hex` in name of variables of type data_t to reserve it for variables of type char* that are the hexadecimal representation of a data buffer. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
9fde353f68
commit
aea41df254
15 changed files with 197 additions and 252 deletions
|
|
@ -8,8 +8,7 @@
|
|||
*/
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void mbedtls_arc4_crypt( data_t * src_str, data_t * key_str,
|
||||
data_t * hex_dst_string )
|
||||
void mbedtls_arc4_crypt( data_t * src_str, data_t * key_str, data_t * dst )
|
||||
{
|
||||
unsigned char dst_str[1000];
|
||||
mbedtls_arc4_context ctx;
|
||||
|
|
@ -19,11 +18,11 @@ void mbedtls_arc4_crypt( data_t * src_str, data_t * key_str,
|
|||
|
||||
|
||||
mbedtls_arc4_setup(&ctx, key_str->x, key_str->len);
|
||||
TEST_ASSERT( mbedtls_arc4_crypt(&ctx, src_str->len, src_str->x, dst_str ) == 0 );
|
||||
TEST_ASSERT( mbedtls_arc4_crypt(&ctx, src_str->len,
|
||||
src_str->x, dst_str ) == 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_test_hexcmp( dst_str, hex_dst_string->x,
|
||||
src_str->len,
|
||||
hex_dst_string->len ) == 0 );
|
||||
TEST_ASSERT( mbedtls_test_hexcmp( dst_str, dst->x,
|
||||
src_str->len, dst->len ) == 0 );
|
||||
|
||||
exit:
|
||||
mbedtls_arc4_free( &ctx );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue