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