md5utils.c File Reference

Kamailio MD5 handling functions. More...

#include <stdio.h>
#include <sys/stat.h>
#include "md5.h"
#include "md5utils.h"
#include "dprint.h"
#include "ut.h"

Include dependency graph for md5utils.c:

Go to the source code of this file.

Functions

int MD5File (char *dest, const char *file_name)
 Calculate a MD5 digest over a file. This function assumes 32 bytes in the destination buffer.
void MD5StringArray (char *dest, str src[], unsigned int size)
 Calculate a MD5 digests over a string array and stores the result in the destination char array. This function assumes 32 bytes in the destination buffer.


Detailed Description

Kamailio MD5 handling functions.

Definition in file md5utils.c.


Function Documentation

int MD5File ( char *  dest,
const char *  file_name 
)

Calculate a MD5 digest over a file. This function assumes 32 bytes in the destination buffer.

Parameters:
dest destination
file_name file for that the digest should be calculated
Returns:
zero on success, negative on errors

Definition at line 72 of file md5utils.c.

References counter, hash, LM_DBG, LM_ERR, MD5_LEN, MD5Init(), NULL, string2hex(), U_MD5Final(), and U_MD5Update().

Referenced by mi_check_hash(), and mod_init().

void MD5StringArray ( char *  dest,
str  src[],
unsigned int  size 
)

Calculate a MD5 digests over a string array and stores the result in the destination char array. This function assumes 32 bytes in the destination buffer.

Parameters:
dest destination
src string input array
size elements in the input array

Definition at line 47 of file md5utils.c.

References len, LM_DBG, MD5_LEN, MD5Init(), MD5Update(), string2hex(), trim_len, and U_MD5Final().

Referenced by char_msg_val(), init_tags(), and uac_init().


Generated on Wed May 23 18:00:41 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6