Adapt programs / test suites to _init() and _free()
diff --git a/tests/suites/test_suite_des.function b/tests/suites/test_suite_des.function
index d5d0f11..0231757 100644
--- a/tests/suites/test_suite_des.function
+++ b/tests/suites/test_suite_des.function
@@ -34,6 +34,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ des_init( &ctx );
unhexify( key_str, hex_key_string );
unhexify( src_str, hex_src_string );
@@ -43,6 +44,8 @@
hexify( dst_str, output, 8 );
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
+
+ des_free( &ctx );
}
/* END_CASE */
@@ -60,6 +63,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ des_init( &ctx );
unhexify( key_str, hex_key_string );
unhexify( src_str, hex_src_string );
@@ -69,6 +73,8 @@
hexify( dst_str, output, 8 );
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
+
+ des_free( &ctx );
}
/* END_CASE */
@@ -89,6 +95,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ des_init( &ctx );
unhexify( key_str, hex_key_string );
unhexify( iv_str, hex_iv_string );
@@ -102,6 +109,8 @@
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
}
+
+ des_free( &ctx );
}
/* END_CASE */
@@ -122,6 +131,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ des_init( &ctx );
unhexify( key_str, hex_key_string );
unhexify( iv_str, hex_iv_string );
@@ -135,6 +145,8 @@
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
}
+
+ des_free( &ctx );
}
/* END_CASE */
@@ -152,6 +164,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ des3_init( &ctx );
unhexify( key_str, hex_key_string );
unhexify( src_str, hex_src_string );
@@ -167,6 +180,8 @@
hexify( dst_str, output, 8 );
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
+
+ des3_free( &ctx );
}
/* END_CASE */
@@ -184,6 +199,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ des3_init( &ctx );
unhexify( key_str, hex_key_string );
unhexify( src_str, hex_src_string );
@@ -199,6 +215,8 @@
hexify( dst_str, output, 8 );
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
+
+ des3_free( &ctx );
}
/* END_CASE */
@@ -220,6 +238,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ des3_init( &ctx );
unhexify( key_str, hex_key_string );
unhexify( iv_str, hex_iv_string );
@@ -240,6 +259,8 @@
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
}
+
+ des3_free( &ctx );
}
/* END_CASE */
@@ -261,6 +282,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ des3_init( &ctx );
unhexify( key_str, hex_key_string );
unhexify( iv_str, hex_iv_string );
@@ -281,6 +303,8 @@
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
}
+
+ des3_free( &ctx );
}
/* END_CASE */