|
GNU libmicrohttpd 1.0.1
|


Go to the source code of this file.
Data Structures | |
| struct | sha1_ctx |
Macros | |
| #define | _SHA1_DIGEST_LENGTH 5 |
| #define | SHA1_WORD_SIZE_BITS 32 |
| #define | SHA1_BYTES_IN_WORD (SHA1_WORD_SIZE_BITS / 8) |
| #define | SHA1_DIGEST_SIZE (_SHA1_DIGEST_LENGTH * SHA1_BYTES_IN_WORD) |
| #define | SHA1_DIGEST_STRING_SIZE ((SHA1_DIGEST_SIZE) * 2 + 1) |
| #define | SHA1_BLOCK_SIZE_BITS 512 |
| #define | SHA1_BLOCK_SIZE (SHA1_BLOCK_SIZE_BITS / 8) |
Functions | |
| void | MHD_SHA1_init (void *ctx_) |
| void | MHD_SHA1_update (void *ctx_, const uint8_t *data, size_t length) |
| void | MHD_SHA1_finish (void *ctx_, uint8_t digest[SHA1_DIGEST_SIZE]) |
| #define _SHA1_DIGEST_LENGTH 5 |
| #define SHA1_BLOCK_SIZE (SHA1_BLOCK_SIZE_BITS / 8) |
| #define SHA1_BLOCK_SIZE_BITS 512 |
| #define SHA1_BYTES_IN_WORD (SHA1_WORD_SIZE_BITS / 8) |
| #define SHA1_DIGEST_SIZE (_SHA1_DIGEST_LENGTH * SHA1_BYTES_IN_WORD) |
| #define SHA1_DIGEST_STRING_SIZE ((SHA1_DIGEST_SIZE) * 2 + 1) |
| #define SHA1_WORD_SIZE_BITS 32 |
| void MHD_SHA1_finish | ( | void * | ctx_, |
| uint8_t | digest[SHA1_DIGEST_SIZE] | ||
| ) |
Finalise SHA-1 calculation, return digest.
| ctx_ | must be a struct sha1_ctx * | |
| [out] | digest | set to the hash, must be SHA1_DIGEST_SIZE bytes |
< Number of processed bits
< Number of bytes in buffer
< Number of processed bits
< Number of bytes in buffer
Definition at line 314 of file sha1.c.
References _MHD_PUT_32BIT_BE, _MHD_PUT_64BIT_BE_SAFE(), _MHD_UINT32_ALIGN, _SHA1_DIGEST_LENGTH, sha1_ctx::buffer, sha1_ctx::count, sha1_ctx::H, SHA1_BLOCK_SIZE, SHA1_BYTES_IN_WORD, SHA1_DIGEST_SIZE, SHA1_SIZE_OF_LEN_ADD, and sha1_transform().
Referenced by MHD_websocket_create_accept_header().


| void MHD_SHA1_init | ( | void * | ctx_ | ) |
Initialise structure for SHA-1 calculation.
| ctx | must be a struct sha1_ctx * |
Initialise structure for SHA-1 calculation.
| ctx_ | must be a struct sha1_ctx * |
Definition at line 41 of file sha1.c.
References sha1_ctx::count, and sha1_ctx::H.
Referenced by MHD_websocket_create_accept_header().

| void MHD_SHA1_update | ( | void * | ctx_, |
| const uint8_t * | data, | ||
| size_t | length | ||
| ) |
Process portion of bytes.
| ctx_ | must be a struct sha1_ctx * |
| data | bytes to add to hash |
| length | number of bytes in data |
< Number of bytes in buffer
< Number of bytes in buffer
Definition at line 252 of file sha1.c.
References sha1_ctx::buffer, sha1_ctx::count, data, sha1_ctx::H, mhd_assert, NULL, SHA1_BLOCK_SIZE, and sha1_transform().
Referenced by MHD_websocket_create_accept_header().

