GNU libmicrohttpd 0.9.77
|
Go to the source code of this file.
Macros | |
#define | MD5_BYTES_IN_WORD (32 / 8) |
#define | F1(x, y, z) (z ^ (x & (y ^ z))) |
#define | F2(x, y, z) F1 (z, x, y) |
#define | F3(x, y, z) (x ^ y ^ z) |
#define | F4(x, y, z) (y ^ (x | ~z)) |
#define | MD5STEP(f, w, x, y, z, data, s) (w += f (x, y, z) + data, w = _MHD_ROTL32(w, s), w += x) |
Functions | |
void | MHD_MD5Init (void *ctx_) |
static void | MD5Transform (uint32_t state[4], const uint8_t block[MD5_BLOCK_SIZE]) |
void | MHD_MD5Final (void *ctx_, uint8_t digest[MD5_DIGEST_SIZE]) |
void | MHD_MD5Update (void *ctx_, const uint8_t *input, size_t len) |
#define MD5_BYTES_IN_WORD (32 / 8) |
#define MD5STEP | ( | f, | |
w, | |||
x, | |||
y, | |||
z, | |||
data, | |||
s | |||
) | (w += f (x, y, z) + data, w = _MHD_ROTL32(w, s), w += x) |
|
static |
The core of the MD5 algorithm, this alters an existing MD5 hash to reflect the addition of 16 longwords of new data. MHD_MD5Update blocks the data and converts bytes into longwords for this routine.
Definition at line 145 of file md5.c.
References _MHD_GET_32BIT_LE, _MHD_UINT32_ALIGN, F1, F2, F3, F4, MD5_BLOCK_SIZE, MD5_BYTES_IN_WORD, MD5STEP, and MD5Context::state.
Referenced by MHD_MD5Final(), and MHD_MD5Update().
void MHD_MD5Final | ( | void * | ctx_, |
uint8_t | digest[MD5_DIGEST_SIZE] | ||
) |
Final wrapup, fill in digest and zero out ctx.
ctx | must be a struct MD5Context * |
Definition at line 67 of file md5.c.
References _MHD_PUT_32BIT_LE, _MHD_PUT_64BIT_LE_SAFE(), _MHD_UINT32_ALIGN, MD5Context::buffer, MD5Context::count, MD5_BLOCK_SIZE, MD5_BYTES_IN_WORD, MD5_DIGEST_SIZE, MD5Transform(), mhd_assert, NULL, and MD5Context::state.
void MHD_MD5Init | ( | void * | ctx_ | ) |
Start MD5 accumulation. Set bit count to 0 and buffer to mysterious initialization constants.
ctx | must be a struct MD5Context * |
Definition at line 43 of file md5.c.
References MD5Context::count, mhd_assert, NULL, and MD5Context::state.
void MHD_MD5Update | ( | void * | ctx_, |
const uint8_t * | input, | ||
size_t | len | ||
) |
Update context to reflect the concatenation of another buffer full of bytes.
Definition at line 269 of file md5.c.
References MD5Context::buffer, MD5Context::count, MD5_BLOCK_SIZE, MD5Transform(), mhd_assert, NULL, and MD5Context::state.