Lines Matching refs:md_info

50 static int generic_wrapper( const mbedtls_md_info_t *md_info, char *filename, unsigned char *sum )  in generic_wrapper()  argument
52 int ret = mbedtls_md_file( md_info, filename, sum ); in generic_wrapper()
63 static int generic_print( const mbedtls_md_info_t *md_info, char *filename ) in generic_print() argument
68 if( generic_wrapper( md_info, filename, sum ) != 0 ) in generic_print()
71 for( i = 0; i < mbedtls_md_get_size( md_info ); i++ ) in generic_print()
78 static int generic_check( const mbedtls_md_info_t *md_info, char *filename ) in generic_check() argument
111 if( n < (size_t) 2 * mbedtls_md_get_size( md_info ) + 4 ) in generic_check()
113 mbedtls_printf("No '%s' hash found on line.\n", mbedtls_md_get_name( md_info )); in generic_check()
117 …if( line[2 * mbedtls_md_get_size( md_info )] != ' ' || line[2 * mbedtls_md_get_size( md_info ) + 1… in generic_check()
119 mbedtls_printf("No '%s' hash found on line.\n", mbedtls_md_get_name( md_info )); in generic_check()
128 if( generic_wrapper( md_info, line + 2 + 2 * mbedtls_md_get_size( md_info ), sum ) != 0 ) in generic_check()
136 for( i = 0; i < mbedtls_md_get_size( md_info ); i++ ) in generic_check()
141 for( i = 0; i < 2 * mbedtls_md_get_size( md_info ); i++ ) in generic_check()
173 const mbedtls_md_info_t *md_info; in main() local
189 md_info = mbedtls_md_info_from_type( *list ); in main()
190 mbedtls_printf( " %s\n", mbedtls_md_get_name( md_info ) ); in main()
205 md_info = mbedtls_md_info_from_string( argv[1] ); in main()
206 if( md_info == NULL ) in main()
211 if( mbedtls_md_setup( &md_ctx, md_info, 0 ) ) in main()
220 ret |= generic_check( md_info, argv[3] ); in main()
225 ret |= generic_print( md_info, argv[i] ); in main()