Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hmac-sha-md5.c File Reference
#include <string.h>
#include <stdlib.h>
#include "Misc/md5.h"
#include "Misc/sha1.h"
#include "Misc/sha256.h"
#include "Misc/sha512.h"
+ Include dependency graph for hmac-sha-md5.c:

Macros

#define SHA_CASE(x, y)

Functions

void * hmac_md5 (const char *buffer, size_t len, char *key, size_t key_len, char *resbuf)
void * hmac_sha (const char *buffer, size_t len, char *key, size_t key_len, char *resbuf, int type)
static void * hmac_sha_md5 (const char *buffer, size_t len, char *key, size_t key_len, char *resbuf, int type)

Macro Definition Documentation

#define SHA_CASE (   x,
 
)
Value:
case x: \
ctx = malloc(sizeof(struct sha##y##_ctx)); \
init_ctx = (void(*)(void *)) &sha##x##_init_ctx; \
process_bytes = (void(*)(void *, size_t, void *))&sha##y##_process_bytes; \
finish_ctx = (void* (*)(void *, void *)) &sha##x##_finish_ctx; \
blocksize = SHA##x##_BLOCKSIZE; \
digestsize = SHA##x##_DIGESTSIZE; \
break;

Function Documentation

void* hmac_md5 ( const char *  buffer,
size_t  len,
char *  key,
size_t  key_len,
char *  resbuf 
)
void* hmac_sha ( const char *  buffer,
size_t  len,
char *  key,
size_t  key_len,
char *  resbuf,
int  type 
)
static void* hmac_sha_md5 ( const char *  buffer,
size_t  len,
char *  key,
size_t  key_len,
char *  resbuf,
int  type 
)
static