MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxCsslSecureCounter.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020-2023 NXP */
3 /* */
4 /* NXP Confidential. This software is owned or controlled by NXP and may */
5 /* only be used strictly in accordance with the applicable license terms. */
6 /* By expressly accepting such terms or by downloading, installing, */
7 /* activating and/or otherwise using the software, you are agreeing that */
8 /* you have read, and that you agree to comply with and are bound by, such */
9 /* license terms. If you do not agree to be bound by the applicable license */
10 /* terms, then you may not retain, install, activate or otherwise use the */
11 /* software. */
12 /*--------------------------------------------------------------------------*/
13 
19 #ifndef MCUXCSSLSECURECOUNTER_H_
20 #define MCUXCSSLSECURECOUNTER_H_
21 
22 /* Include the actual implementation of the secure counter mechanism. */
24 
42 /****************************************************************************/
43 /* Constants */
44 /****************************************************************************/
45 
52 #define MCUX_CSSL_SC_CHECK_PASSED \
53  MCUX_CSSL_SC_CHECK_PASSED_IMPL
54 
61 #define MCUX_CSSL_SC_CHECK_FAILED \
62  MCUX_CSSL_SC_CHECK_FAILED_IMPL
63 
70 #define MCUX_CSSL_SC_VALUE_TYPE \
71  MCUX_CSSL_SC_VALUE_TYPE_IMPL
72 
73 /****************************************************************************/
74 /* Initialization */
75 /****************************************************************************/
76 
83 #define MCUX_CSSL_SC_ALLOC() \
84  MCUX_CSSL_SC_ALLOC_IMPL()
85 
94 #define MCUX_CSSL_SC_INIT(value) \
95  MCUX_CSSL_SC_INIT_IMPL(value)
96 
97 /****************************************************************************/
98 /* Check */
99 /****************************************************************************/
100 
111 #define MCUX_CSSL_SC_CHECK(reference) \
112  MCUX_CSSL_SC_CHECK_IMPL(reference)
113 
114 /****************************************************************************/
115 /* Counter increment */
116 /****************************************************************************/
136 #define MCUX_CSSL_SC_ADD(value) \
137  MCUX_CSSL_SC_ADD_IMPL(value)
138 
149 #define MCUX_CSSL_SC_ADD_ON_CALL(value) \
150  MCUX_CSSL_SC_ADD_ON_CALL_IMPL(value)
151 
163 #define MCUX_CSSL_SC_ADD_0x1() \
164  MCUX_CSSL_SC_ADD_0x1_IMPL()
165 
177 #define MCUX_CSSL_SC_ADD_0x10() \
178  MCUX_CSSL_SC_ADD_0x10_IMPL()
179 
191 #define MCUX_CSSL_SC_ADD_0x100() \
192  MCUX_CSSL_SC_ADD_0x100_IMPL()
193 
194 /****************************************************************************/
195 /* Counter decrement */
196 /****************************************************************************/
216 #define MCUX_CSSL_SC_SUB(value) \
217  MCUX_CSSL_SC_SUB_IMPL(value)
218 
230 #define MCUX_CSSL_SC_SUB_0x1() \
231  MCUX_CSSL_SC_SUB_0x1_IMPL()
232 
244 #define MCUX_CSSL_SC_SUB_0x10() \
245  MCUX_CSSL_SC_SUB_0x10_IMPL()
246 
258 #define MCUX_CSSL_SC_SUB_0x100() \
259  MCUX_CSSL_SC_SUB_0x100_IMPL()
260 
261 /****************************************************************************/
262 /* Direct access (optional) */
263 /****************************************************************************/
285 #define MCUX_CSSL_SC_VALUE() \
286  MCUX_CSSL_SC_VALUE_IMPL()
287 
301 #define MCUX_CSSL_SC_ASSIGN(value) \
302  MCUX_CSSL_SC_ASSIGN_IMPL(value)
303 
304 #endif /* MCUXCSSLSECURECOUNTER_H_ */
Selection of the implementation for the secure counter mechanism.