Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
Defines | Functions
md5.c File Reference
#include "md5.h"
#include <string.h>

Go to the source code of this file.

Defines

#define aud_md5_bytereverse(buf, len)   do { } while (0)
#define F1(x, y, z)   (z ^ (x & (y ^ z)))
#define F2(x, y, z)   F1(z, x, y)
#define F3(x, y, z)   (x ^ y ^ z)
#define F4(x, y, z)   (y ^ (x | ~z))
#define MD5STEP(f, w, x, y, z, data, s)   ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x )

Functions

void aud_md5_init (aud_md5state_t *ctx)
 Start MD5 accumulation.
static void aud_md5_transform (guint32 buf[4], guint32 const in[16])
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.

Define Documentation

#define aud_md5_bytereverse (   buf,
  len 
)    do { } while (0)

Definition at line 15 of file md5.c.

Referenced by aud_md5_append(), and aud_md5_finish().

#define F1 (   x,
  y,
 
)    (z ^ (x & (y ^ z)))

Definition at line 55 of file md5.c.

Referenced by aud_md5_transform().

#define F2 (   x,
  y,
 
)    F1(z, x, y)

Definition at line 56 of file md5.c.

Referenced by aud_md5_transform().

#define F3 (   x,
  y,
 
)    (x ^ y ^ z)

Definition at line 57 of file md5.c.

Referenced by aud_md5_transform().

#define F4 (   x,
  y,
 
)    (y ^ (x | ~z))

Definition at line 58 of file md5.c.

Referenced by aud_md5_transform().

#define MD5STEP (   f,
  w,
  x,
  y,
  z,
  data,
 
)    ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x )

Definition at line 59 of file md5.c.

Referenced by aud_md5_transform().


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:
ctxState context to add data in.
bufPointer to buffer of data.
lenLength/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:
ctxState context to be hashed.
digestVariable 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:
ctxContext structure to initialize.

Definition at line 39 of file md5.c.

static void aud_md5_transform ( guint32  buf[4],
guint32 const  in[16] 
) [static]

Definition at line 62 of file md5.c.

Referenced by aud_md5_append(), and aud_md5_finish().