X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fmd5.c;h=52c113a8abb0bec9eebc85248fa3ed900df92790;hp=480c860c0aa9b0d9aa2be2001804ca56e4b09f54;hb=cbb598e017f8808949953dc57e42c8cf4e9aeb92;hpb=f7195b02ffc90bb9ee482c537074a84f8561aa61 diff --git a/pppd/md5.c b/pppd/md5.c index 480c860..52c113a 100644 --- a/pppd/md5.c +++ b/pppd/md5.c @@ -33,6 +33,7 @@ *********************************************************************** */ +#include #include "md5.h" /* @@ -156,7 +157,8 @@ unsigned int inLen; /* The routine MD5Final terminates the message-digest computation and ends with the desired message digest in mdContext->digest[0...15]. */ -void MD5Final (mdContext) +void MD5Final (hash, mdContext) +unsigned char hash[]; MD5_CTX *mdContext; { UINT4 in[16]; @@ -193,6 +195,7 @@ MD5_CTX *mdContext; mdContext->digest[ii+3] = (unsigned char)((mdContext->buf[i] >> 24) & 0xFF); } + memcpy(hash, mdContext->digest, 16); } /* Basic MD5 step. Transforms buf based on in.