Remove support for passing variable args to the md5sum() function, since
no code currently uses this, and it causes problems processing strings
with '%' characters.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Calculates the md5 of the text provided.
The returned string must be freed by the caller.
*/
-char* md5sum( const char* text, ... );
+char* md5sum( const char* text );
/*
This function is a wrapper for some public domain routines written by David Madore,
Ron Rivest, and Colin Plumb.
*/
-char* md5sum( const char* text, ... ) {
+char* md5sum( const char* text ) {
struct md5_ctx ctx;
unsigned char digest[16];
MD5_start (&ctx);
- VA_LIST_TO_STRING(text);
-
int i;
- for ( i=0 ; i != strlen(VA_BUF) ; i++ )
- MD5_feed (&ctx, VA_BUF[i]);
+ for ( i=0 ; i != strlen(text) ; i++ )
+ MD5_feed (&ctx, text[i]);
MD5_stop (&ctx, digest);