Defines | Functions

md5.c File Reference

SIP-router core :: md5 hash supportModule: SIP-router core. More...

#include <string.h>
#include "md5.h"
Include dependency graph for md5.c:

Go to the source code of this file.

Defines

Constants for MD5Transform routine

F, G, H and I are basic MD5 functions

FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4

FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.

Rotation is separate from addition to prevent recomputation.

Functions


Detailed Description

Definition in file md5.c.


Function Documentation

static void Decode ( unsigned int *  output,
unsigned char *  input,
unsigned int  len 
) [static]

Decodes input (unsigned char) into output (unsigned int). Assumes len is a multiple of 4.

Parameters:
output output integer
input input character
len length of input

Definition at line 336 of file md5.c.

Referenced by MD5Transform().

Here is the caller graph for this function:

static void Encode ( unsigned char *  output,
unsigned int *  input,
unsigned int  len 
) [static]

Encodes input (unsigned int) into output (unsigned char). Assumes len is a multiple of 4.

Parameters:
output output character
input integer input
len length of output

Definition at line 315 of file md5.c.

Referenced by U_MD5Final().

Here is the caller graph for this function:

void MD5Init ( MD5_CTX context  ) 

MD5 context initialization. Begins an MD5 operation, writing a new context.

Parameters:
context initialized context

Definition at line 120 of file md5.c.

Referenced by compute_md5(), hash(), and MD5StringArray().

Here is the caller graph for this function:

static void MD5Transform ( unsigned int  state[4],
unsigned char  block[64] 
) [static]

MD5 basic transformation. Transforms state based on block.

Parameters:
state transformed state
block block input for transformation

Definition at line 218 of file md5.c.

References Decode().

Referenced by U_MD5Update().

Here is the call graph for this function:

Here is the caller graph for this function:

void U_MD5Final ( unsigned char  digest[16],
MD5_CTX context 
)

MD5 finalization. Ends an MD5 message-digest operation, writing the the message digest and zeroizing the context.

Parameters:
digest message digest
context context

Definition at line 186 of file md5.c.

References Encode(), and U_MD5Update().

Referenced by compute_md5(), MD5Final(), and MD5StringArray().

Here is the call graph for this function:

Here is the caller graph for this function:

void U_MD5Update ( MD5_CTX context,
unsigned char *  input,
unsigned int  inputLen 
)

MD5 block update operation. Continues an MD5 message-digest operation, processing another message block, and updating the context.

Parameters:
context context
input input block
inputLen length of input block

Definition at line 141 of file md5.c.

References MD5Transform().

Referenced by MD5Update(), and U_MD5Final().

Here is the call graph for this function:

Here is the caller graph for this function: