X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=md5ify.c;h=5affe31651981b4f26e938f9cffbc664673b1da1;hb=edb8384a00f108b385d0df7ddfa5bd671a36f946;hp=8999c6d637630dc4bb7ea7fbcac2187e89d4658f;hpb=50a942cfbffdb207a849b2580aeb22613166e7e0;p=~andy%2Ffetchmail diff --git a/md5ify.c b/md5ify.c index 8999c6d6..5affe316 100644 --- a/md5ify.c +++ b/md5ify.c @@ -1,5 +1,4 @@ -/* Copyright 1993-95 by Carl Harris, Jr. Copyright 1996 by Eric S. Raymond - * All rights reserved. +/* * For license terms, see the file COPYING in this directory. */ @@ -12,16 +11,16 @@ ***********************************************************************/ #include +#include #if defined(STDC_HEADERS) #include #endif -#include "md5.h" +#include "fm_md5.h" char * -MD5Digest (s) -char *s; +MD5Digest (unsigned const char *s) { int i; MD5_CTX context; @@ -29,9 +28,9 @@ char *s; static char ascii_digest [33]; MD5Init(&context); - MD5Update(&context, s, strlen(s)); + MD5Update(&context, s, strlen((const char *)s)); MD5Final(digest, &context); - + for (i = 0; i < 16; i++) sprintf(ascii_digest+2*i, "%02x", digest[i]);