SemiDrive SSDK Appication Program Interface PTG3.0
Data Structures
hmac.h File Reference
#include "hash.h"

Go to the source code of this file.

Data Structures

struct  hmac_ctx_t
 

Macro Definition Documentation

◆ HMAC_IPAD

#define HMAC_IPAD   (0x36363636)

◆ HMAC_IPAD_XOR_OPAD

#define HMAC_IPAD_XOR_OPAD   (HMAC_IPAD ^ HMAC_OPAD)

◆ HMAC_OPAD

#define HMAC_OPAD   (0x5c5c5c5c)

Function Documentation

◆ hmac()

uint32_t hmac ( HASH_ALG  hash_alg,
uint8_t *  key,
uint16_t  sp_key_idx,
uint32_t  key_bytes,
uint8_t *  msg,
uint32_t  msg_bytes,
uint8_t *  mac 
)

◆ hmac_final()

uint32_t hmac_final ( hmac_ctx_t ctx,
uint8_t *  mac 
)

◆ hmac_init()

uint32_t hmac_init ( hmac_ctx_t ctx,
HASH_ALG  hash_alg,
uint8_t *  key,
uint16_t  sp_key_idx,
uint32_t  key_bytes 
)

◆ hmac_update()

uint32_t hmac_update ( hmac_ctx_t ctx,
const uint8_t *  msg,
uint32_t  msg_bytes 
)