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

MD5 hash implementation and interface functions. More...

#include <stdint.h>
#include "md5.h"
#include "md5_internal.h"
#include "utils/allocs.h"
#include "utils/os.h"
Include dependency graph for md5.c:

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

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