MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
mcuxCsslExamples.h
1/*--------------------------------------------------------------------------*/
2/* Copyright 2020-2022, 2025 NXP */
3/* */
4/* NXP Confidential and Proprietary. This software is owned or controlled */
5/* by NXP and may only be used strictly in accordance with the applicable */
6/* license terms. By expressly accepting such terms or by downloading, */
7/* installing, activating and/or otherwise using the software, you are */
8/* agreeing that you have read, and that you agree to comply with and are */
9/* bound by, such license terms. If you do not agree to be bound by the */
10/* applicable license terms, then you may not retain, install, activate or */
11/* otherwise use the 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) __attribute__((section(".example"))) bool _name(void)
22
23#define MCUX_CSSL_EX_OK (bool) true
24#define MCUX_CSSL_EX_ERROR (bool) false
25
26static inline bool mcuxCsslExamples_assertEqual(const uint8_t * const x, const uint8_t * const y, uint32_t length)
27{
28 for (uint32_t i = 0; i < length; ++i)
29 {
30 if (x[i] != y[i])
31 {
32 return false;
33 }
34 }
35
36 return true;
37}
38
39MCUX_CSSL_EX_FUNCTION(mcuxCsslFlowProtection_Assert_example);
40MCUX_CSSL_EX_FUNCTION(mcuxCsslFlowProtection_Branch_example);
41MCUX_CSSL_EX_FUNCTION(mcuxCsslFlowProtection_Function_example);
42MCUX_CSSL_EX_FUNCTION(mcuxCsslFlowProtection_Loop_example);
43
44#endif /* MCUX_CSSL_EXAMPLES_H_ */