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

# beecrypt/hmac.c File Reference

HMAC message authentication code, code. More...

`#include "system.h"`
`#include "hmac.h"`
`#include "mp32.h"`
`#include "endianness.h"`
`#include "debug.h"`

Go to the source code of this file.

## Defines
#define | HMAC_IPAD 0x36
#define | HMAC_OPAD 0x5c
## Functions
int | hmacSetup (hmacParam *hp, const hashFunction *hash, hashFunctionParam *param, const uint32 *key, int keybits)
int | hmacReset (hmacParam *hp, const hashFunction *hash, hashFunctionParam *param)
int | hmacUpdate (hmacParam *hp, const hashFunction *hash, hashFunctionParam *param, const byte *data, int size)
int | hmacDigest (hmacParam *hp, const hashFunction *hash, hashFunctionParam *param, uint32 *data)

## Detailed Description

HMAC message authentication code, code.

Definition in file hmac.c.

## Define Documentation

#define HMAC_IPAD 0x36

| Definition at line 34 of file hmac.c. Referenced by hmacSetup.

#define HMAC_OPAD 0x5c

| Definition at line 35 of file hmac.c. Referenced by hmacSetup.

## Function Documentation

int hmacDigest | ( | hmacParam * | hp,
|  | const hashFunction * | hash,
|  | hashFunctionParam * | param,
|  | uint32 * | data
| ) |

| Definition at line 121 of file hmac.c. References hashFunction::digest, hashFunction::digestsize, encodeInts, hashFunctionParam, javaint, hmacParam::kxo, uint32, and hashFunction::update.

int hmacReset | ( | hmacParam * | hp,
|  | const hashFunction * | hash,
|  | hashFunctionParam * | param
| ) |

| Definition at line 105 of file hmac.c. References hashFunctionParam, hmacParam::kxi, hashFunction::reset, and hashFunction::update.

int hmacSetup | ( | hmacParam * | hp,
|  | const hashFunction * | hash,
|  | hashFunctionParam * | param,
|  | const uint32 * | key,
|  | int | keybits
| ) |

| Definition at line 38 of file hmac.c. References hashFunction::digest, hashFunction::digestsize, encodeInts, encodeIntsPartial, hashFunctionParam, HMAC_IPAD, HMAC_OPAD, hmacReset, hmacParam::kxi, hmacParam::kxo, hashFunction::reset, uint32, and hashFunction::update.

int hmacUpdate | ( | hmacParam * | hp,
|  | const hashFunction * | hash,
|  | hashFunctionParam * | param,
|  | const byte * | data,
|  | int | size
| ) |

| Definition at line 116 of file hmac.c. References hashFunctionParam, and hashFunction::update.