Adapted programs / test suites to _init() and _free()
diff --git a/tests/suites/test_suite_mdx.function b/tests/suites/test_suite_mdx.function
index 24fb328..12a5e1b 100644
--- a/tests/suites/test_suite_mdx.function
+++ b/tests/suites/test_suite_mdx.function
@@ -98,6 +98,7 @@
memset( src_str, 0x00, sizeof src_str );
memset( key_str, 0x00, sizeof key_str );
+ md2_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
src_len = unhexify( src_str, hex_src_string );
@@ -137,6 +138,8 @@
hexify( hash_str, output, sizeof output );
TEST_ASSERT( strncmp( (char *) hash_str, hex_hash_string, trunc_size * 2 ) == 0 );
+
+ md2_free( &ctx );
}
/* END_CASE */
@@ -153,6 +156,7 @@
memset( src_str, 0x00, sizeof src_str );
memset( key_str, 0x00, sizeof key_str );
+ md4_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
src_len = unhexify( src_str, hex_src_string );
@@ -192,6 +196,8 @@
hexify( hash_str, output, sizeof output );
TEST_ASSERT( strncmp( (char *) hash_str, hex_hash_string, trunc_size * 2 ) == 0 );
+
+ md4_free( &ctx );
}
/* END_CASE */
@@ -208,6 +214,7 @@
memset( src_str, 0x00, sizeof src_str );
memset( key_str, 0x00, sizeof key_str );
+ md5_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
src_len = unhexify( src_str, hex_src_string );
@@ -247,6 +254,8 @@
hexify( hash_str, output, sizeof output );
TEST_ASSERT( strncmp( (char *) hash_str, hex_hash_string, trunc_size * 2 ) == 0 );
+
+ md5_free( &ctx );
}
/* END_CASE */
@@ -263,6 +272,7 @@
memset( src_str, 0x00, sizeof src_str );
memset( key_str, 0x00, sizeof key_str );
+ ripemd160_init( &ctx );
key_len = unhexify( key_str, hex_key_string );
src_len = unhexify( src_str, hex_src_string );
@@ -302,6 +312,8 @@
hexify( hash_str, output, sizeof output );
TEST_ASSERT( strncmp( (char *) hash_str, hex_hash_string, trunc_size * 2 ) == 0 );
+
+ ripemd160_free( &ctx );
}
/* END_CASE */