wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Typedefs | Functions
md5-internal.c File Reference

MD5 hash implementation and interface functions. More...

#include "includes.h"
#include "common.h"
#include "md5.h"
#include "md5_i.h"
#include "crypto.h"

Macros

#define byteReverse(buf, len)   /* Nothing */
 
#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 )
 

Typedefs

typedef struct MD5Context MD5_CTX
 

Functions

int md5_vector (size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
 MD5 hash for data vector. More...
 
void MD5Init (struct MD5Context *ctx)
 
void MD5Update (struct MD5Context *ctx, unsigned char const *buf, unsigned len)
 
void MD5Final (unsigned char digest[16], struct MD5Context *ctx)
 

Detailed Description

MD5 hash implementation and interface functions.

Function Documentation

int md5_vector ( size_t  num_elem,
const u8 *  addr[],
const size_t *  len,
u8 *  mac 
)

MD5 hash for data vector.

Parameters
num_elemNumber of elements in the data vector
addrPointers to the data areas
lenLengths of the data blocks
macBuffer for the hash
Returns
0 on success, -1 of failure