Adapt programs / test suites to _init() and _free()
diff --git a/tests/suites/test_suite_blowfish.function b/tests/suites/test_suite_blowfish.function
index 673b88c..17a5b65 100644
--- a/tests/suites/test_suite_blowfish.function
+++ b/tests/suites/test_suite_blowfish.function
@@ -22,6 +22,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ blowfish_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
unhexify( src_str, hex_src_string );
@@ -34,6 +35,8 @@
TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
}
+
+ blowfish_free( &ctx );
}
/* END_CASE */
@@ -52,6 +55,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ blowfish_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
unhexify( src_str, hex_src_string );
@@ -64,6 +68,8 @@
TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
}
+
+ blowfish_free( &ctx );
}
/* END_CASE */
@@ -85,6 +91,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ blowfish_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
unhexify( iv_str, hex_iv_string );
@@ -99,6 +106,8 @@
TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
}
+
+ blowfish_free( &ctx );
}
/* END_CASE */
@@ -120,6 +129,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ blowfish_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
unhexify( iv_str, hex_iv_string );
@@ -133,6 +143,8 @@
TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
}
+
+ blowfish_free( &ctx );
}
/* END_CASE */
@@ -154,6 +166,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ blowfish_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
unhexify( iv_str, hex_iv_string );
@@ -164,6 +177,8 @@
hexify( dst_str, output, src_len );
TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
+
+ blowfish_free( &ctx );
}
/* END_CASE */
@@ -185,6 +200,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ blowfish_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
unhexify( iv_str, hex_iv_string );
@@ -195,6 +211,8 @@
hexify( dst_str, output, src_len );
TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
+
+ blowfish_free( &ctx );
}
/* END_CASE */
@@ -218,6 +236,7 @@
memset(src_str, 0x00, 100);
memset(dst_str, 0x00, 100);
memset(output, 0x00, 100);
+ blowfish_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
unhexify( iv_str, hex_iv_string );
@@ -228,5 +247,7 @@
hexify( dst_str, output, src_len );
TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
+
+ blowfish_free( &ctx );
}
/* END_CASE */