GNU libmicrohttpd 1.0.0
Loading...
Searching...
No Matches
md5_ext.c File Reference

Wrapper for MD5 calculation performed by TLS library. More...

#include "md5_ext.h"
#include "mhd_assert.h"
Include dependency graph for md5_ext.c:

Go to the source code of this file.

Functions

void MHD_MD5_init_one_time (struct Md5CtxExt *ctx)
 
void MHD_MD5_update (struct Md5CtxExt *ctx, const uint8_t *data, size_t length)
 
void MHD_MD5_finish_reset (struct Md5CtxExt *ctx, uint8_t digest[MD5_DIGEST_SIZE])
 
void MHD_MD5_deinit (struct Md5CtxExt *ctx)
 

Detailed Description

Wrapper for MD5 calculation performed by TLS library.

Author
Karlson2k (Evgeny Grin)

Definition in file md5_ext.c.

Function Documentation

◆ MHD_MD5_deinit()

void MHD_MD5_deinit ( struct Md5CtxExt * ctx)

Free allocated resources.

Parameters
ctxthe calculation context

Definition at line 96 of file md5_ext.c.

References Md5CtxExt::handle, and NULL.

◆ MHD_MD5_finish_reset()

void MHD_MD5_finish_reset ( struct Md5CtxExt * ctx,
uint8_t digest[MD5_DIGEST_SIZE] )

Finalise MD5 calculation, return digest, reset hash calculation.

Parameters
ctxthe calculation context
[out]digestset to the hash, must be MD5_DIGEST_SIZE bytes

Definition at line 82 of file md5_ext.c.

References Md5CtxExt::ext_error, Md5CtxExt::handle, and MD5_DIGEST_SIZE.

◆ MHD_MD5_init_one_time()

void MHD_MD5_init_one_time ( struct Md5CtxExt * ctx)

Initialise structure for MD5 calculation, allocate resources.

This function must not be called more than one time for ctx.

Parameters
ctxthe calculation context

Definition at line 37 of file md5_ext.c.

References Md5CtxExt::ext_error, Md5CtxExt::handle, mhd_assert, and NULL.

◆ MHD_MD5_update()

void MHD_MD5_update ( struct Md5CtxExt * ctx,
const uint8_t * data,
size_t length )

Process portion of bytes.

Parameters
ctxthe calculation context
databytes to add to hash
lengthnumber of bytes in data

Definition at line 66 of file md5_ext.c.

References data, Md5CtxExt::ext_error, and Md5CtxExt::handle.