summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrypt/md5.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libcrypt/md5.c b/libcrypt/md5.c
index 82b35dd40..989d4482c 100644
--- a/libcrypt/md5.c
+++ b/libcrypt/md5.c
@@ -195,10 +195,10 @@ static void __md5_Init (struct MD5Context *context)
static void __md5_Update ( struct MD5Context *context, const unsigned char *input, unsigned int inputLen)
{
- 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] += ((u_int32_t)inputLen << 3))
@@ -206,24 +206,24 @@ static void __md5_Update ( struct MD5Context *context, const unsigned char *inpu
context->count[1]++;
context->count[1] += ((u_int32_t)inputLen >> 29);
- partLen = 64 - index;
+ partLen = 64 - idx;
/* Transform as many times as possible. */
if (inputLen >= partLen) {
- memcpy((void *)&context->buffer[index], (const void *)input,
+ memcpy((void *)&context->buffer[idx], (const void *)input,
partLen);
__md5_Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
__md5_Transform (context->state, &input[i]);
- index = 0;
+ idx = 0;
}
else
i = 0;
/* Buffer remaining input */
- memcpy ((void *)&context->buffer[index], (const void *)&input[i],
+ memcpy ((void *)&context->buffer[idx], (const void *)&input[i],
inputLen-i);
}
@@ -234,7 +234,7 @@ static void __md5_Update ( struct MD5Context *context, const unsigned char *inpu
static void __md5_Pad ( struct MD5Context *context)
{
unsigned char bits[8];
- unsigned int index, padLen;
+ unsigned int idx, padLen;
unsigned char PADDING[64];
memset(PADDING, 0, sizeof(PADDING));
@@ -244,8 +244,8 @@ static void __md5_Pad ( struct MD5Context *context)
__md5_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);
__md5_Update (context, PADDING, padLen);
/* Append length (before padding) */