MCUX CLNS MCUX Crypto Library Normal Secure |

mcuxCsslExamples.h
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020 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
14 #ifndef MCUX_CSSL_EXAMPLES_H_
15 #define MCUX_CSSL_EXAMPLES_H_
16
17 #include <stdint.h>
18 #include <stdbool.h>
19 #include <stddef.h>
20
21 #define MCUX_CSSL_EX_FUNCTION(_name) uint32_t _name(void)
22
23 #define MCUX_CSSL_EX_OK 0xC001C0DEu
24 #define MCUX_CSSL_EX_ERROR 0xEEEEEEEEu
25
26 static inline bool mcuxCsslExamples_assertEqual(const uint8_t * const x, const uint8_t * const y, uint32_t size)
27 {
28 for (uint32_t i = 0; i < size; ++i)
29 {
30 if (x[i] != y[i])
31 {
32 return false;
33 }
34 }
35
36 return true;
37 }
38
39 MCUX_CSSL_EX_FUNCTION(mcuxCsslFlowProtection_example);
40
41 #endif /* MCUX_CSSL_EXAMPLES_H_ */