Lines Matching defs:context
100 * MD4 initialization. Begins an MD4 operation, writing a new context.
103 MD4Init(MD4_CTX *context)
105 context->count[0] = context->count[1] = 0;
110 context->state[0] = 0x67452301UL;
111 context->state[1] = 0xefcdab89UL;
112 context->state[2] = 0x98badcfeUL;
113 context->state[3] = 0x10325476UL;
120 * context.
123 MD4Update(MD4_CTX *context, const void *_RESTRICT_KYWD inptr, size_t inputLen)
129 index = (unsigned int)((context->count[0] >> 3) & 0x3F);
131 if ((context->count[0] += ((uint32_t)inputLen << 3))
133 context->count[1]++;
134 context->count[1] += ((uint32_t)inputLen >> 29);
142 bcopy(input, &context->buffer[index], partLen);
143 MD4Transform(context->state, (uchar_t *)context->buffer);
146 MD4Transform(context->state, (uchar_t *)&input[i]);
155 bcopy(&input[i], &context->buffer[index], inputLen - i);
160 * the message digest and zeroizing the context.
163 MD4Final(void *digest, MD4_CTX *context)
169 Encode(bits, context->count, 8);
174 index = (unsigned int)((context->count[0] >> 3) & 0x3f);
176 MD4Update(context, PADDING, padLen);
179 MD4Update(context, bits, 8);
181 Encode(digest, context->state, 16);
184 bzero(context, sizeof (*context));