Lines Matching refs:context
18 Use the real memcpy() and memset(). Use unified context
99 /* MD4 initialization. Begins an MD4 operation, writing a new context.
101 VOIDRET opiemd4init FUNCTION((context), struct opiemdx_ctx *context)
103 context->count[0] = context->count[1] = 0;
106 context->state[0] = 0x67452301;
107 context->state[1] = 0xefcdab89;
108 context->state[2] = 0x98badcfe;
109 context->state[3] = 0x10325476;
114 context.
116 VOIDRET opiemd4update FUNCTION((context, input, inputLen), struct opiemdx_ctx *context AND unsigned char *input AND unsigned int inputLen)
121 index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
123 if ((context->count[0] += ((UINT4) inputLen << 3))
125 context->count[1]++;
126 context->count[1] += ((UINT4) inputLen >> 29);
132 memcpy((POINTER) & context->buffer[index], (POINTER) input, partLen);
133 MD4Transform(context->state, context->buffer);
136 MD4Transform(context->state, &input[i]);
143 memcpy((POINTER) & context->buffer[index], (POINTER) & input[i], inputLen - i);
147 the message digest and zeroizing the context.
149 VOIDRET opiemd4final FUNCTION((digest, context), unsigned char *digest AND struct opiemdx_ctx *context)
155 Encode(bits, context->count, 8);
158 index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
160 opiemd4update(context, PADDING, padLen);
163 opiemd4update(context, bits, 8);
165 Encode(digest, context->state, 16);
168 memset((POINTER) context, 0, sizeof(*context));