SemiDrive SSDK Appication Program Interface PTG3.0
hmac_sha224.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 *
4 *Copyright (c) 2021-2029 Semidrive Incorporated. All rights reserved.
5 *Software License Agreement
6 *
7 ******************************************************************************
8 */
9#ifndef HMAC_SHA224_H
10#define HMAC_SHA224_H
11
12#include "hmac.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#ifdef SUPPORT_HASH_SHA224
19
20typedef hmac_ctx_t HMAC_SHA224_CTX;
21
22#ifdef HASH_DMA_FUNCTION
23typedef hmac_dma_ctx_t HMAC_SHA224_DMA_CTX;
24#endif
25
26uint32_t hmac_sha224_init(HMAC_SHA224_CTX *ctx, uint8_t *key,
27 uint16_t sp_key_idx, uint32_t key_bytes);
28
29uint32_t hmac_sha224_update(HMAC_SHA224_CTX *ctx, const uint8_t *msg,
30 uint32_t msg_bytes);
31
32uint32_t hmac_sha224_final(HMAC_SHA224_CTX *ctx, uint8_t *mac);
33
34uint32_t hmac_sha224(uint8_t *key, uint16_t sp_key_idx, uint32_t key_bytes,
35 uint8_t *msg, uint32_t msg_bytes, uint8_t *mac);
36
37#ifdef HASH_DMA_FUNCTION
38uint32_t hmac_sha224_dma_init(HMAC_SHA224_DMA_CTX *ctx, const uint8_t *key,
39 uint16_t sp_key_idx, uint32_t key_bytes,
40 HASH_CALLBACK callback);
41
42uint32_t hmac_sha224_dma_update_blocks(HMAC_SHA224_DMA_CTX *ctx, uint32_t *msg,
43 uint32_t msg_words,
44 uint32_t *tmp_iterator);
45
46uint32_t hmac_sha224_dma_final(HMAC_SHA224_DMA_CTX *ctx,
47 uint32_t *remainder_msg,
48 uint32_t remainder_bytes, uint32_t *tmp_iterator,
49 uint8_t *mac);
50
51uint32_t hmac_sha224_dma(uint8_t *key, uint16_t sp_key_idx, uint32_t key_bytes,
52 uint32_t *msg, uint32_t msg_bytes,
53 uint32_t *tmp_iterator, uint8_t *mac,
54 HASH_CALLBACK callback);
55#endif
56
57#endif
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif
void(* HASH_CALLBACK)(void)
Definition: hash_basic.h:195
Definition: hmac.h:23