SemiDrive SSDK Appication Program Interface PTG3.0
sha384.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 SHA384_H
10#define SHA384_H
11
12#include "hash.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#ifdef SUPPORT_HASH_SHA384
19
20typedef hash_ctx_t sha384_ctx_t;
21
22#ifdef HASH_DMA_FUNCTION
23typedef hash_dma_ctx_t sha384_dma_ctx_t;
24#endif
25
26uint32_t sha384_init(sha384_ctx_t *ctx);
27
28uint32_t sha384_update(sha384_ctx_t *ctx, const uint8_t *msg,
29 uint32_t msg_bytes);
30
31uint32_t sha384_final(sha384_ctx_t *ctx, uint8_t *digest);
32
33uint32_t sha384(uint8_t *msg, uint32_t msg_bytes, uint8_t *digest);
34
35#ifdef HASH_DMA_FUNCTION
36uint32_t sha384_dma_init(sha384_dma_ctx_t *ctx, HASH_CALLBACK callback);
37
38uint32_t sha384_dma_update_blocks(sha384_dma_ctx_t *ctx, uint32_t *msg,
39 uint32_t msg_words, uint32_t *iterator);
40
41uint32_t sha384_dma_final(sha384_dma_ctx_t *ctx, uint32_t *remainder_msg,
42 uint32_t remainder_bytes, uint32_t *digest);
43
44uint32_t sha384_dma(uint32_t *msg, uint32_t msg_bytes, uint32_t *digest,
45 HASH_CALLBACK callback);
46#endif
47
48#endif
49
50#ifdef __cplusplus
51}
52#endif
53
54#endif
void(* HASH_CALLBACK)(void)
Definition: hash_basic.h:195
Definition: hash.h:24