Home | History | Annotate | Download | only in Modules

Lines Matching refs:pms

133 md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
136 a = pms->abcd[0], b = pms->abcd[1],
137 c = pms->abcd[2], d = pms->abcd[3];
307 pms->abcd[0] += a;
308 pms->abcd[1] += b;
309 pms->abcd[2] += c;
310 pms->abcd[3] += d;
314 md5_init(md5_state_t *pms)
316 pms->count[0] = pms->count[1] = 0;
317 pms->abcd[0] = 0x67452301;
318 pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
319 pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
320 pms->abcd[3] = 0x10325476;
324 md5_append(md5_state_t *pms, const md5_byte_t *data, unsigned int nbytes)
328 unsigned int offset = (pms->count[0] >> 3) & 63;
341 md5_append(pms, data, overlap);
342 md5_append(pms, data + overlap, nbytes - overlap);
347 pms->count[1] += nbytes >> 29;
348 pms->count[0] += nbits;
349 if (pms->count[0] < nbits)
350 pms->count[1]++;
356 memcpy(pms->buf + offset, p, copy);
361 md5_process(pms, pms->buf);
366 md5_process(pms, p);
370 memcpy(pms->buf, p, left);
374 md5_finish(md5_state_t *pms, md5_byte_t digest[16])
387 data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
389 md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
391 md5_append(pms, data, 8);
393 digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));