Lines Matching +full:- +full:5
19 (section A.5) but excluding the rest of Appendix A. It does not include
27 2002-04-13 lpd Removed support for non-ANSI compilers; removed
30 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
31 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
34 1999-05-03 lpd Original version.
41 * This package supports both compile-time and run-time determination of CPU
43 * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
44 * defined as non-zero, the code will be compiled to run only on big-endian
46 * run on either big- or little-endian CPUs, but will run slightly less
50 typedef unsigned char md5_byte_t; /* 8-bit byte */
51 typedef unsigned int md5_word_t; /* 32-bit word */
83 This software is provided 'as-is', without any express or implied
111 (section A.5) but excluding the rest of Appendix A. It does not include
119 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order
122 2002-03-11 lpd Corrected argument list for main(), and added int return
124 2002-02-21 lpd Added missing #include <stdio.h> in test program.
125 2000-07-03 lpd Patched to eliminate warnings about "constant is
127 self-checking.
128 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
129 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
130 1999-05-03 lpd Original version.
137 #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
139 #define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
213 md5_word_t a = pms->abcd[0], b = pms->abcd[1], c = pms->abcd[2],
214 d = pms->abcd[3];
217 /* Define storage only for big-endian CPUs. */
220 /* Define storage for little-endian or both types of CPUs. */
228 * Determine dynamically whether this is a big-endian or
229 * little-endian machine, since we can use a more efficient
234 if (*((const md5_byte_t *)&w)) /* dynamic little-endian */
236 #if BYTE_ORDER <= 0 /* little-endian */
239 * On little-endian machines, we can process properly aligned
242 if (!((data - (const md5_byte_t *)0) & 3)) {
246 https://github.com/bel2125/civetweb/issues/94#issuecomment-98112861
257 else /* dynamic big-endian */
259 #if BYTE_ORDER >= 0 /* big-endian */
262 * On big-endian machines, we must arrange the bytes in the
281 #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
297 SET(d, a, b, c, 5, 12, T6);
319 SET(a, b, c, d, 1, 5, T17);
323 SET(a, b, c, d, 5, 5, T21);
327 SET(a, b, c, d, 9, 5, T25);
331 SET(a, b, c, d, 13, 5, T29);
346 SET(a, b, c, d, 5, 4, T33);
376 SET(b, c, d, a, 5, 21, T52);
394 pms->abcd[0] += a;
395 pms->abcd[1] += b;
396 pms->abcd[2] += c;
397 pms->abcd[3] += d;
403 pms->count[0] = pms->count[1] = 0;
404 pms->abcd[0] = 0x67452301;
405 pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
406 pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
407 pms->abcd[3] = 0x10325476;
415 size_t offset = (pms->count[0] >> 3) & 63;
422 pms->count[1] += (md5_word_t)(nbytes >> 29);
423 pms->count[0] += nbits;
424 if (pms->count[0] < nbits)
425 pms->count[1]++;
429 size_t copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
431 memcpy(pms->buf + offset, p, copy);
435 left -= copy;
436 md5_process(pms, pms->buf);
440 for (; left >= 64; p += 64, left -= 64)
445 memcpy(pms->buf, p, left);
461 data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
463 md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
467 digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));