SemiDrive SSDK Appication Program Interface PTG3.0
md5.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 MD5_H
10#define MD5_H
11
12#include "hash.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#ifdef SUPPORT_HASH_MD5
19
20typedef hash_ctx_t md5_ctx_t;
21
22#ifdef HASH_DMA_FUNCTION
23typedef hash_dma_ctx_t md5_dma_ctx_t;
24#endif
25
26uint32_t md5_init(md5_ctx_t *ctx);
27
28uint32_t md5_update(md5_ctx_t *ctx, const uint8_t *msg, uint32_t msg_bytes);
29
30uint32_t md5_final(md5_ctx_t *ctx, uint8_t *digest);
31
32uint32_t md5_(uint8_t *msg, uint32_t msg_bytes, uint8_t *digest);
33
34#ifdef HASH_DMA_FUNCTION
35uint32_t md5_dma_init(md5_dma_ctx_t *ctx, HASH_CALLBACK callback);
36
37uint32_t md5_dma_update_blocks(md5_dma_ctx_t *ctx, uint32_t *msg,
38 uint32_t msg_words, uint32_t *iterator);
39
40uint32_t md5_dma_final(md5_dma_ctx_t *ctx, uint32_t *remainder_msg,
41 uint32_t remainder_bytes, uint32_t *digest);
42
43uint32_t md5_dma(uint32_t *msg, uint32_t msg_bytes, uint32_t *digest,
44 HASH_CALLBACK callback);
45#endif
46
47#endif
48
49#ifdef __cplusplus
50}
51#endif
52
53#endif
void(* HASH_CALLBACK)(void)
Definition: hash_basic.h:195
Definition: hash.h:24