developer | 7043679 | 2023-05-19 09:31:20 +0800 | [diff] [blame] | 1 | #ifndef AESCCM_H |
2 | #define AESCCM_H | ||||
3 | #include "common.h" | ||||
4 | int ccm_init(void); | ||||
5 | int ccm_uninit(void); | ||||
6 | int ccm_encrypt(void); | ||||
7 | int ccm_decrypt(void); | ||||
8 | int ccm_check(void); | ||||
9 | |||||
10 | struct ccm_data { | ||||
11 | unsigned char *key; | ||||
12 | unsigned char *nonce; | ||||
13 | unsigned char *adata; | ||||
14 | unsigned char *payload; | ||||
15 | unsigned char *ct; | ||||
16 | unsigned char *tag; | ||||
17 | long key_size; | ||||
18 | long nonce_size; | ||||
19 | long adata_size; | ||||
20 | long payload_size; | ||||
21 | long ct_size; | ||||
22 | int tag_output_size; | ||||
23 | long tag_size; | ||||
24 | }; | ||||
25 | |||||
26 | extern struct operator ccm_oper; | ||||
27 | |||||
28 | #endif |