|
GNU libmicrohttpd 1.0.0
|
Calculation of MD5 digest as defined in RFC 1321. More...

Go to the source code of this file.
Macros | |
| #define | F_FUNC(x, y, z) |
| #define | G_FUNC_1(x, y, z) |
| #define | G_FUNC_2(x, y, z) |
| #define | H_FUNC(x, y, z) |
| #define | I_FUNC(x, y, z) |
| #define | MD5STEP_R1(va, vb, vc, vd, vX, vs, vT) |
| #define | GET_X_FROM_DATA(buf, t) |
| #define | MD5STEP_R2(va, vb, vc, vd, vX, vs, vT) |
| #define | MD5STEP_R3(va, vb, vc, vd, vX, vs, vT) |
| #define | MD5STEP_R4(va, vb, vc, vd, vX, vs, vT) |
| #define | MD5_SIZE_OF_LEN_ADD_BITS 64 |
| #define | MD5_SIZE_OF_LEN_ADD (MD5_SIZE_OF_LEN_ADD_BITS / 8) |
Functions | |
| void | MHD_MD5_init (struct Md5Ctx *ctx) |
| static MHD_DATA_TRUNCATION_RUNTIME_CHECK_DISABLE_ void | md5_transform (uint32_t H[MD5_HASH_SIZE_WORDS], const void *M) |
| void | MHD_MD5_update (struct Md5Ctx *ctx, const uint8_t *data, size_t length) |
| void | MHD_MD5_finish (struct Md5Ctx *ctx, uint8_t digest[MD5_DIGEST_SIZE]) |
Calculation of MD5 digest as defined in RFC 1321.
Definition in file md5.c.
| #define F_FUNC | ( | x, | |
| y, | |||
| z ) |
| #define G_FUNC_1 | ( | x, | |
| y, | |||
| z ) |
| #define G_FUNC_2 | ( | x, | |
| y, | |||
| z ) |
| #define GET_X_FROM_DATA | ( | buf, | |
| t ) |
Referenced by md5_transform().
| #define H_FUNC | ( | x, | |
| y, | |||
| z ) |
| #define I_FUNC | ( | x, | |
| y, | |||
| z ) |
| #define MD5_SIZE_OF_LEN_ADD (MD5_SIZE_OF_LEN_ADD_BITS / 8) |
Size of "length" insertion in bytes.
Definition at line 452 of file md5.c.
Referenced by MHD_MD5_finish().
| #define MD5_SIZE_OF_LEN_ADD_BITS 64 |
| #define MD5STEP_R1 | ( | va, | |
| vb, | |||
| vc, | |||
| vd, | |||
| vX, | |||
| vs, | |||
| vT ) |
Referenced by md5_transform().
| #define MD5STEP_R2 | ( | va, | |
| vb, | |||
| vc, | |||
| vd, | |||
| vX, | |||
| vs, | |||
| vT ) |
Referenced by md5_transform().
| #define MD5STEP_R3 | ( | va, | |
| vb, | |||
| vc, | |||
| vd, | |||
| vX, | |||
| vs, | |||
| vT ) |
Referenced by md5_transform().
| #define MD5STEP_R4 | ( | va, | |
| vb, | |||
| vc, | |||
| vd, | |||
| vX, | |||
| vs, | |||
| vT ) |
Referenced by md5_transform().
|
static |
Base of MD5 transformation. Gets full 64 bytes block of data and updates hash values;
| H | hash values |
| M | the data buffer with MD5_BLOCK_SIZE bytes block |
Definition at line 66 of file md5.c.
References _MHD_UINT32_ALIGN, GET_X_FROM_DATA, MD5STEP_R1, MD5STEP_R2, MD5STEP_R3, and MD5STEP_R4.
Referenced by MHD_MD5_finish(), and MHD_MD5_update().

| void MHD_MD5_finish | ( | struct Md5Ctx * | ctx, |
| uint8_t | digest[MD5_DIGEST_SIZE] ) |
Finalise MD5 calculation, return digest.
| ctx | the calculation context | |
| [out] | digest | set to the hash, must be MD5_DIGEST_SIZE bytes |
< Number of processed bits
< Number of bytes in the context buffer
Definition at line 461 of file md5.c.
References _MHD_PUT_32BIT_LE, _MHD_PUT_64BIT_LE_SAFE(), _MHD_UINT32_ALIGN, Md5Ctx::buffer, Md5Ctx::count, Md5Ctx::H, MD5_BLOCK_SIZE, MD5_BLOCK_SIZE_WORDS, MD5_BYTES_IN_WORD, MD5_DIGEST_SIZE, MD5_DIGEST_SIZE_WORDS, MD5_SIZE_OF_LEN_ADD, and md5_transform().
Referenced by digest_calc_hash().


| void MHD_MD5_init | ( | struct Md5Ctx * | ctx | ) |
Initialise structure for MD5 calculation.
| ctx | the calculation context |
Definition at line 41 of file md5.c.
References Md5Ctx::count, and Md5Ctx::H.
| void MHD_MD5_update | ( | struct Md5Ctx * | ctx, |
| const uint8_t * | data, | ||
| size_t | length ) |
Process portion of bytes.
| ctx | the calculation context |
| data | bytes to add to hash |
| length | number of bytes in data |
< Number of bytes in the context buffer
Definition at line 393 of file md5.c.
References Md5Ctx::buffer, Md5Ctx::count, data, Md5Ctx::H, MD5_BLOCK_SIZE, md5_transform(), mhd_assert, and NULL.
Referenced by digest_update().

