Classes | Defines | Typedefs | Functions

md5.h File Reference

Functions for computing MD5 hashes of given data. More...

#include <glib.h>

Go to the source code of this file.

Classes

struct  aud_md5state_t
 State context structure for MD5 hash calculation. More...

Defines

#define AUD_MD5HASH_LENGTH   (16)
 Length of MD5 hash in bytes.
#define AUD_MD5HASH_LENGTH_CH   (AUD_MD5HASH_LENGTH * 2)
 Length of MD5 hash in ASCII characters.

Typedefs

typedef guint8 aud_md5hash_t [AUD_MD5HASH_LENGTH]
 Type for holding calculated MD5 hash digest.

Functions

void aud_md5_init (aud_md5state_t *ctx)
 Start MD5 accumulation.
void aud_md5_append (aud_md5state_t *ctx, const guint8 *buf, guint len)
 Appends more data to the MD5 state context.
void aud_md5_finish (aud_md5state_t *ctx, aud_md5hash_t digest)
 Calculates a MD5 hash digest from the given context.

Detailed Description

Functions for computing MD5 hashes of given data.

Definition in file md5.h.


Define Documentation

#define AUD_MD5HASH_LENGTH   (16)

Length of MD5 hash in bytes.

Definition at line 20 of file md5.h.

#define AUD_MD5HASH_LENGTH_CH   (AUD_MD5HASH_LENGTH * 2)

Length of MD5 hash in ASCII characters.

Definition at line 23 of file md5.h.


Typedef Documentation

typedef guint8 aud_md5hash_t[AUD_MD5HASH_LENGTH]

Type for holding calculated MD5 hash digest.

Definition at line 26 of file md5.h.


Function Documentation

void aud_md5_append ( aud_md5state_t ctx,
const guint8 *  buf,
guint  len 
)

Appends more data to the MD5 state context.

Updates context to reflect the concatenation of another buffer full of bytes.

Parameters:
ctx State context to add data in.
buf Pointer to buffer of data.
len Length/size of the data in buffer.

Definition at line 154 of file md5.c.

void aud_md5_finish ( aud_md5state_t ctx,
aud_md5hash_t  digest 
)

Calculates a MD5 hash digest from the given context.

Parameters:
ctx State context to be hashed.
digest Variable where computed MD5 digest is placed.

Definition at line 201 of file md5.c.

void aud_md5_init ( aud_md5state_t ctx  ) 

Start MD5 accumulation.

Set bit count to 0 and buffer to mysterious initialization constants. Initializes the given state context.

Parameters:
ctx Context structure to initialize.

Definition at line 39 of file md5.c.