Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

integ.c File Reference

#include "common.h"
#include <stdlib.h>
#include "integ.h"
#include "hmac.h"
#include "enums.h"

Functions

uint32_t GetIntegKeyLen (uint32_t type)
 get the key length for a given integrity algorithm
uint32_t GetChecksumLen (uint32_t type)
 Get checksum length of a given integrity algorithm.
uint32_t GetIntegDigestLen (uint32_t type)
 Get digest length used by sepcified integrity algorithm.
int IntegKeyLenValid (uint32_t type, uint32_t keylen)
 Check for valid key length.
void integ (const uint8_t *key, uint32_t klen, const uint8_t *text, uint32_t tlen, uint8_t **res, uint32_t *rlen, uint32_t integtype)

Function Documentation

uint32_t GetChecksumLen uint32_t  type  )  [inline]
 

Get checksum length of a given integrity algorithm.

Parameters:
type type of integrity algorithm
Returns:
length in bytes

uint32_t GetIntegDigestLen uint32_t  type  )  [inline]
 

Get digest length used by sepcified integrity algorithm.

Parameters:
type integrity algorithm type
Returns:
length of digest in bytes

uint32_t GetIntegKeyLen uint32_t  type  )  [inline]
 

get the key length for a given integrity algorithm

Parameters:
type type of the integrity algorithm
Returns:
integrity key length in bytes

void integ const uint8_t *  key,
uint32_t  klen,
const uint8_t *  text,
uint32_t  tlen,
uint8_t **  res,
uint32_t *  rlen,
uint32_t  integtype
 

int IntegKeyLenValid uint32_t  type,
uint32_t  keylen
[inline]
 

Check for valid key length.

Parameters:
type integrity algorithm
keylen key length in bytes
Returns:
1 on succes, 0 otherwise


Project hosted by: SourceForge.net Logo