EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
Macros | Functions
md5.h File Reference

MD5 hash implementation and interface functions. More...

#include <stdint.h>
#include <sys/types.h>
#include <unistd.h>
Include dependency graph for md5.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MD5_MAC_LEN   16
 
#define hmac_md5(key, key_len, data, data_len, mac)    edge_hmac_md5((key), (key_len), (data), (data_len), (mac))
 

Functions

int edge_hmac_md5 (const uint8_t *key, size_t key_len, const uint8_t *data, size_t data_len, uint8_t *mac)
 

Detailed Description

MD5 hash implementation and interface functions.

Author
Jouni Malinen

Macro Definition Documentation

◆ hmac_md5

#define hmac_md5 (   key,
  key_len,
  data,
  data_len,
  mac 
)     edge_hmac_md5((key), (key_len), (data), (data_len), (mac))

◆ MD5_MAC_LEN

#define MD5_MAC_LEN   16

Function Documentation

◆ edge_hmac_md5()

int edge_hmac_md5 ( const uint8_t *  key,
size_t  key_len,
const uint8_t *  data,
size_t  data_len,
uint8_t *  mac 
)

HMAC-MD5 over data buffer (RFC 2104)

Parameters
keyKey for HMAC operations
key_lenLength of the key in bytes
dataPointers to the data area
data_lenLength of the data area
[out]macBuffer for the hash (16 bytes)
Return values
0on success
-1on failure
Author
Jouni Malinen j@w1..nosp@m.fi
Date
2003-2009
Remarks
The source of this code was adapted from hmac_md5() in commit 0a5d68aba50c385e316a30d834d5b6174a4041d2 in src/crypto/md5.c of the hostap project, see https://w1.fi/cgit/hostap/tree/src/crypto/md5.c?id=0a5d68aba50c385e316a30d834d5b6174a4041d2#n98