Lines Matching refs:char
16 unsigned char buf[150];
47 unsigned char buf[1] = { 0 };
106 void md_info( int md_type, char *md_name, int md_size )
117 TEST_ASSERT( mbedtls_md_get_size( md_info ) == (unsigned char) md_size );
129 void md_text( char *text_md_name, char *text_src_string, char *hex_hash_string )
131 char md_name[100];
132 unsigned char src_str[1000];
133 unsigned char hash_str[1000];
134 unsigned char output[100];
142 strncpy( (char *) src_str, text_src_string, sizeof( src_str ) - 1 );
143 strncpy( (char *) md_name, text_md_name, sizeof( md_name ) - 1 );
147 TEST_ASSERT ( 0 == mbedtls_md( md_info, src_str, strlen( (char *) src_str ), output ) );
150 TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 );
155 void md_hex( char *text_md_name, char *hex_src_string, char *hex_hash_string )
157 char md_name[100];
158 unsigned char src_str[10000];
159 unsigned char hash_str[10000];
160 unsigned char output[100];
169 strncpy( (char *) md_name, text_md_name, sizeof( md_name ) - 1 );
178 TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 );
183 void md_text_multi( char *text_md_name, char *text_src_string,
184 char *hex_hash_string )
186 char md_name[100];
187 unsigned char src_str[1000];
188 unsigned char hash_str[1000];
189 unsigned char output[100];
203 strncpy( (char *) src_str, text_src_string, sizeof(src_str) - 1 );
204 strncpy( (char *) md_name, text_md_name, sizeof(md_name) - 1 );
205 len = strlen( (char *) src_str );
221 TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 );
230 TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 );
239 void md_hex_multi( char *text_md_name, char *hex_src_string,
240 char *hex_hash_string )
242 char md_name[100];
243 unsigned char src_str[10000];
244 unsigned char hash_str[10000];
245 unsigned char output[100];
258 strncpy( (char *) md_name, text_md_name, sizeof( md_name ) - 1 );
275 TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 );
284 TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 );
293 void mbedtls_md_hmac( char *text_md_name, int trunc_size, char *hex_key_string,
294 char *hex_src_string, char *hex_hash_string )
296 char md_name[100];
297 unsigned char src_str[10000];
298 unsigned char key_str[10000];
299 unsigned char hash_str[10000];
300 unsigned char output[100];
310 strncpy( (char *) md_name, text_md_name, sizeof( md_name ) - 1 );
320 TEST_ASSERT( strncmp( (char *) hash_str, hex_hash_string, trunc_size * 2 ) == 0 );
325 void md_hmac_multi( char *text_md_name, int trunc_size, char *hex_key_string,
326 char *hex_src_string, char *hex_hash_string )
328 char md_name[100];
329 unsigned char src_str[10000];
330 unsigned char key_str[10000];
331 unsigned char hash_str[10000];
332 unsigned char output[100];
345 strncpy( (char *) md_name, text_md_name, sizeof( md_name ) - 1 );
361 TEST_ASSERT( strncmp( (char *) hash_str, hex_hash_string, trunc_size * 2 ) == 0 );
373 TEST_ASSERT( strncmp( (char *) hash_str, hex_hash_string, trunc_size * 2 ) == 0 );
381 void mbedtls_md_file( char *text_md_name, char *filename, char *hex_hash_string )
383 char md_name[100];
384 unsigned char hash_str[1000];
385 unsigned char output[100];
392 strncpy( (char *) md_name, text_md_name, sizeof( md_name ) - 1 );
399 TEST_ASSERT( strcmp( (char *) hash_str, hex_hash_string ) == 0 );