Lines Matching defs:context

156  * SHA1 initialization. Begins a SHA1 operation, writing a new context.
159 FIPS_SHA1Init(SHA1_CTX *context)
161 context->bcount[0] = context->bcount[1] = 0;
162 context->count = 0;
165 context->state[0] = 0x67452301UL;
166 context->state[1] = 0xefcdab89UL;
167 context->state[2] = 0x98badcfeUL;
168 context->state[3] = 0x10325476UL;
169 context->state[4] = 0xc3d2e1f0UL;
175 * context.
177 void FIPS_SHA1Update(SHA1_CTX *context, const void *inpp, size_t inputLen)
186 index = (context->bcount[1] >> 3) & 0x3F;
189 if ((context->bcount[1] += (inputLen << 3)) < (inputLen << 3))
190 context->bcount[0]++;
191 context->bcount[0] += (inputLen >> 29);
199 memcpy(&context->buffer[index], input, partLen);
200 SHA1Transform(context->state[0], context->state[1],
201 context->state[2], context->state[3],
202 context->state[4], context->buffer, context);
207 SHA1Transform(context->state[0], context->state[1],
208 context->state[2], context->state[3],
209 context->state[4], &input[i], context);
218 memcpy(&context->buffer[index], &input[i], inputLen - i);
238 * the message digest and zeroizing the context.
241 FIPS_SHA1Final(void *digest, SHA1_CTX *context)
244 u_int32_t index = (context->bcount[1] >> 3) & 0x3f;
247 Encode(bits, context->bcount, 8);
250 FIPS_SHA1Update(context, PADDING, ((index < 56) ? 56 : 120) - index);
253 FIPS_SHA1Update(context, bits, 8);
256 Encode(digest, context->state, 20);
259 memset(context, 0, sizeof (*context));
267 u_int32_t e, const u_int8_t block[64], SHA1_CTX *context)
377 context->state[0] += a;
378 context->state[1] += b;
379 context->state[2] += c;
380 context->state[3] += d;
381 context->state[4] += e;