const char * md_kt_name (const md_info_t *kt) { if (NULL == kt) return "[null-digest]"; return md_get_name (kt); }
void show_available_digests () { const int *digests = md_list(); #ifndef ENABLE_SMALL printf ("The following message digests are available for use with\n" PACKAGE_NAME ". A message digest is used in conjunction with\n" "the HMAC function, to authenticate received packets.\n" "You can specify a message digest as parameter to\n" "the --auth option.\n\n"); #endif while (*digests != 0) { const md_info_t *info = md_info_from_type(*digests); if (info) printf ("%s %d bit default key\n", md_get_name(info), md_get_size(info) * 8); digests++; } printf ("\n"); }