18#define HMAC_IPAD (0x36363636)
19#define HMAC_OPAD (0x5c5c5c5c)
20#define HMAC_IPAD_XOR_OPAD (HMAC_IPAD ^ HMAC_OPAD)
31#ifdef HASH_DMA_FUNCTION
34 hash_dma_ctx_t hash_dma_ctx[1];
39 uint16_t sp_key_idx, uint32_t key_bytes);
46 uint32_t key_bytes, uint8_t *msg, uint32_t msg_bytes,
49#ifdef HASH_DMA_FUNCTION
50uint32_t hmac_dma_init(hmac_dma_ctx_t *ctx,
HASH_ALG hash_alg,
51 const uint8_t *key, uint16_t sp_key_idx,
54uint32_t hmac_dma_update_blocks(hmac_dma_ctx_t *ctx, uint32_t *msg,
55 uint32_t msg_words, uint32_t *tmp_iterator);
57uint32_t hmac_dma_final(hmac_dma_ctx_t *ctx, uint32_t *remainder_msg,
58 uint32_t remainder_bytes, uint32_t *tmp_iterator,
61uint32_t hmac_dma(
HASH_ALG hash_alg, uint8_t *key, uint16_t sp_key_idx,
62 uint32_t key_bytes, uint32_t *msg, uint32_t msg_bytes,
63 uint32_t *tmp_iterator, uint8_t *mac,
HASH_CALLBACK callback);
HASH_ALG
Definition: hash_basic.h:131
void(* HASH_CALLBACK)(void)
Definition: hash_basic.h:195
#define HASH_BLOCK_MAX_WORD_LEN
Definition: hash_basic.h:104
uint32_t hmac_final(hmac_ctx_t *ctx, uint8_t *mac)
uint32_t hmac_init(hmac_ctx_t *ctx, HASH_ALG hash_alg, uint8_t *key, uint16_t sp_key_idx, uint32_t key_bytes)
uint32_t hmac_update(hmac_ctx_t *ctx, const uint8_t *msg, uint32_t msg_bytes)
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)
HASH_ALG hash_alg
Definition: hmac.h:26
uint32_t key_flag
Definition: hmac.h:25