X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fmd5.c;h=9fb3397b6fb98c32a980cb35b2847b5a4de17bf4;hp=20397603834b8f4c1226befa324f6722a1771101;hb=bdd34ab1f2f87acb23c6d92feee7354ac53005ff;hpb=fd72d1cb02044e3ec19193206e22082fc4faca48 diff --git a/pppd/md5.c b/pppd/md5.c index 2039760..9fb3397 100644 --- a/pppd/md5.c +++ b/pppd/md5.c @@ -33,6 +33,10 @@ *********************************************************************** */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include "md5.h" @@ -48,7 +52,7 @@ */ /* forward declaration */ -static void Transform (); +static void Transform (UINT4 *buf, UINT4 *in); static unsigned char PADDING[64] = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -102,8 +106,7 @@ static unsigned char PADDING[64] = { /* The routine MD5_Init initializes the message-digest context mdContext. All fields are set to zero. */ -void MD5_Init (mdContext) -MD5_CTX *mdContext; +void MD5_Init (MD5_CTX *mdContext) { mdContext->i[0] = mdContext->i[1] = (UINT4)0; @@ -119,10 +122,7 @@ MD5_CTX *mdContext; account for the presence of each of the characters inBuf[0..inLen-1] in the message whose digest is being computed. */ -void MD5_Update (mdContext, inBuf, inLen) -MD5_CTX *mdContext; -unsigned char *inBuf; -unsigned int inLen; +void MD5_Update (MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen) { UINT4 in[16]; int mdi; @@ -157,9 +157,7 @@ unsigned int inLen; /* The routine MD5Final terminates the message-digest computation and ends with the desired message digest in mdContext->digest[0...15]. */ -void MD5_Final (hash, mdContext) -unsigned char hash[]; -MD5_CTX *mdContext; +void MD5_Final (unsigned char hash[], MD5_CTX *mdContext) { UINT4 in[16]; int mdi; @@ -200,9 +198,7 @@ MD5_CTX *mdContext; /* Basic MD5 step. Transforms buf based on in. */ -static void Transform (buf, in) -UINT4 *buf; -UINT4 *in; +static void Transform (UINT4 *buf, UINT4 *in) { UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];