GNU libmicrohttpd 1.0.1
|
Calculation of MD5 digest. More...
Go to the source code of this file.
Data Structures | |
struct | Md5Ctx |
Functions | |
void | MHD_MD5_init (struct Md5Ctx *ctx) |
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.
Definition in file md5.h.
#define MD5_BLOCK_SIZE (MD5_BLOCK_SIZE_BITS / 8) |
Size of MD5 single processing block in bytes.
Definition at line 76 of file md5.h.
Referenced by MHD_MD5_finish(), and MHD_MD5_update().
#define MD5_BLOCK_SIZE_BITS 512 |
#define MD5_BLOCK_SIZE_WORDS (MD5_BLOCK_SIZE_BITS / MD5_WORD_SIZE_BITS) |
Size of MD5 single processing block in words.
Definition at line 81 of file md5.h.
Referenced by MHD_MD5_finish().
#define MD5_BYTES_IN_WORD (MD5_WORD_SIZE_BITS / 8) |
Number of bytes in single MD5 word.
Definition at line 43 of file md5.h.
Referenced by MHD_MD5_finish().
#define MD5_DIGEST_SIZE (MD5_DIGEST_SIZE_WORDS * MD5_BYTES_IN_WORD) |
Size of MD5 resulting digest in bytes This is the final digest size, not intermediate hash.
Definition at line 61 of file md5.h.
Referenced by digest_get_hash_size(), digest_get_size(), get_nonce_timestamp(), and MHD_MD5_finish().
#define MD5_DIGEST_SIZE_WORDS MD5_HASH_SIZE_WORDS |
Size of MD5 resulting digest in bytes. This is the final digest size, not intermediate hash.
Definition at line 55 of file md5.h.
Referenced by MHD_MD5_finish().
#define MD5_DIGEST_STRING_SIZE ((MD5_DIGEST_SIZE) * 2 + 1) |
#define MD5_HASH_SIZE_WORDS 4 |
#define MD5_WORD_SIZE_BITS 32 |
#define MHD_MD5_HAS_FINISH 1 |
Indicates that function MHD_MD5_finish() (without context reset) is available
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, md5_transform(), and MHD_HTTP_OK.
Referenced by digest_calc_hash().
Initialise structure for MD5 calculation.
ctx | the calculation context |
Definition at line 41 of file md5.c.
References Md5Ctx::count, Md5Ctx::H, and MHD_HTTP_OK.
MD5 process portion of bytes.
ctx | the calculation context |
data | bytes to add to hash |
length | number of bytes in data |
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, MHD_HTTP_OK, and NULL.
Referenced by digest_update().