1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-14 21:47:19 +02:00

* md.c (md_algo_present): New function to check if a given algo is in use

for a given MD_HANDLE.
This commit is contained in:
David Shaw 2002-08-07 19:47:57 +00:00
parent c8b8326aae
commit faed12a698
2 changed files with 22 additions and 2 deletions

View file

@ -408,6 +408,23 @@ md_get_algo( MD_HANDLE a )
return 0;
}
/* Returns true if a given algo is in use in a md */
int
md_algo_present( MD_HANDLE a, int algo )
{
struct md_digest_list_s *r=a->list;
while(r)
{
if(r->algo==algo)
return 1;
r=r->next;
}
return 0;
}
/****************
* Return the length of the digest
*/
@ -485,4 +502,3 @@ md_stop_debug( MD_HANDLE md )
}
#endif
}