Lines Matching refs:context
198 void SHA1Init(context) in SHA1Init() argument
199 SHA1_CTX *context; in SHA1Init()
202 assert(context != 0);
205 context->state[0] = 0x67452301;
206 context->state[1] = 0xEFCDAB89;
207 context->state[2] = 0x98BADCFE;
208 context->state[3] = 0x10325476;
209 context->state[4] = 0xC3D2E1F0;
210 context->count[0] = context->count[1] = 0;
217 void SHA1Update(context, data, len) in SHA1Update() argument
218 SHA1_CTX *context; in SHA1Update()
224 assert(context != 0);
227 j = context->count[0];
228 if ((context->count[0] += len << 3) < j)
229 context->count[1] += (len>>29)+1;
232 (void)memcpy(&context->buffer[j], data, (i = 64-j));
233 SHA1Transform(context->state, context->buffer);
235 SHA1Transform(context->state, &data[i]);
240 (void)memcpy(&context->buffer[j], &data[i], len - i);
247 void SHA1Final(digest, context) in SHA1Final() argument
249 SHA1_CTX* context;
255 assert(context != 0);
258 finalcount[i] = (u_char)((context->count[(i >= 4 ? 0 : 1)]
261 SHA1Update(context, (const u_char *)"\200", 1);
262 while ((context->count[0] & 504) != 448)
263 SHA1Update(context, (const u_char *)"\0", 1);
264 SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */
269 ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);