1 /*
2  * Copyright (c) 2001-2022, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef MBEDTLS_CCM_ALT_H
8 #define MBEDTLS_CCM_ALT_H
9 
10 #include "mbedtls/build_info.h"
11 
12 #include <stddef.h>
13 #include <stdint.h>
14 #include "mbedtls/cipher.h"
15 
16 
17 #define MBEDTLS_ERR_CCM_BAD_INPUT      -0x000D /**< Bad input parameters to function. */
18 #define MBEDTLS_ERR_CCM_AUTH_FAILED    -0x000F /**< Authenticated decryption failed. */
19 
20 /* hide internal implementation of the struct. Allocate enough space for it.*/
21 #define MBEDTLS_CCM_CONTEXT_SIZE_IN_WORDS 264
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /**
28  * \brief          The CCM context-type definition. The CCM context is passed
29  *                 to the APIs called.
30  */
31 typedef struct {
32     uint32_t buf[MBEDTLS_CCM_CONTEXT_SIZE_IN_WORDS];
33 }
34 mbedtls_ccm_context;
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif /* MBEDTLS_CCM_ALT_H */
41