Index: ossp-pkg/petidomo/generate_cookie.c RCS File: /v/ossp/cvs/ossp-pkg/petidomo/Attic/generate_cookie.c,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/petidomo/Attic/generate_cookie.c,v' 2>/dev/null --- generate_cookie.c 2001/01/18 20:30:50 1.2 +++ generate_cookie.c 2001/01/19 08:31:14 1.3 @@ -18,6 +18,7 @@ */ #include "petidomo.h" +#include typedef unsigned char * POINTER; @@ -242,10 +243,10 @@ const unsigned char *input; /* input block */ unsigned int inputLen; /* length of input block */ { - unsigned int i, index, partLen; + unsigned int i, idx, partLen; /* Compute number of bytes mod 64 */ - index = (unsigned int)((context->count[0] >> 3) & 0x3F); + idx = (unsigned int)((context->count[0] >> 3) & 0x3F); /* Update number of bits */ if ((context->count[0] += ((UINT4)inputLen << 3)) @@ -253,23 +254,23 @@ context->count[1]++; context->count[1] += ((UINT4)inputLen >> 29); - partLen = 64 - index; + partLen = 64 - idx; /* Transform as many times as possible. */ if (inputLen >= partLen) { - memcpy((POINTER)&context->buffer[index], + memcpy((POINTER)&context->buffer[idx], (POINTER)input, partLen); MD5Transform(context->state, context->buffer); for (i = partLen; i + 63 < inputLen; i += 64) MD5Transform(context->state, &input[i]); - index = 0; + idx = 0; } else i = 0; /* Buffer remaining input */ - memcpy((POINTER)&context->buffer[index], (POINTER)&input[i], + memcpy((POINTER)&context->buffer[idx], (POINTER)&input[i], inputLen - i); } @@ -283,14 +284,14 @@ MD5_CTX *context; /* context */ { unsigned char bits[8]; - unsigned int index, padLen; + unsigned int idx, padLen; /* Save number of bits */ Encode(bits, context->count, 8); /* Pad out to 56 mod 64. */ - index = (unsigned int)((context->count[0] >> 3) & 0x3f); - padLen = (index < 56) ? (56 - index) : (120 - index); + idx = (unsigned int)((context->count[0] >> 3) & 0x3f); + padLen = (idx < 56) ? (56 - idx) : (120 - idx); MD5Update (context, PADDING, padLen); /* Append length (before padding) */