Lines 347-356
Link Here
|
347 |
/* MD5 basic transformation. Transforms state based on block. */ |
347 |
/* MD5 basic transformation. Transforms state based on block. */ |
348 |
static void MD5Transform(apr_uint32_t state[4], const unsigned char block[64]) |
348 |
static void MD5Transform(apr_uint32_t state[4], const unsigned char block[64]) |
349 |
{ |
349 |
{ |
|
|
350 |
#if !APR_IS_BIGENDIAN |
351 |
apr_uint32_t a = state[0], b = state[1], c = state[2], d = state[3]; |
352 |
const apr_uint32_t *x = (const apr_uint32_t*)(block); |
353 |
#else |
350 |
apr_uint32_t a = state[0], b = state[1], c = state[2], d = state[3], |
354 |
apr_uint32_t a = state[0], b = state[1], c = state[2], d = state[3], |
351 |
x[APR_MD5_DIGESTSIZE]; |
355 |
x[APR_MD5_DIGESTSIZE]; |
352 |
|
356 |
|
353 |
Decode(x, block, 64); |
357 |
Decode(x, block, 64); |
|
|
358 |
#endif |
354 |
|
359 |
|
355 |
/* Round 1 */ |
360 |
/* Round 1 */ |
356 |
FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */ |
361 |
FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */ |
Lines 429-436
Link Here
|
429 |
state[2] += c; |
434 |
state[2] += c; |
430 |
state[3] += d; |
435 |
state[3] += d; |
431 |
|
436 |
|
|
|
437 |
#if APR_IS_BIGENDIAN |
432 |
/* Zeroize sensitive information. */ |
438 |
/* Zeroize sensitive information. */ |
433 |
memset(x, 0, sizeof(x)); |
439 |
memset(x, 0, sizeof(x)); |
|
|
440 |
#endif |
434 |
} |
441 |
} |
435 |
|
442 |
|
436 |
/* Encodes input (apr_uint32_t) into output (unsigned char). Assumes len is |
443 |
/* Encodes input (apr_uint32_t) into output (unsigned char). Assumes len is |