14 #ifndef MCUXCLEXAMPLE_RNG_HELPER_H_ 15 #define MCUXCLEXAMPLE_RNG_HELPER_H_ 17 #include <mcuxClConfig.h> 18 #include <mcuxClCore_Platform.h> 26 #define MCUXCLEXAMPLE_ALLOCATE_RNG_CTXT(rngCtxLength) (rngCtxLength?((rngCtxLength + sizeof(uint32_t) - 1u) / sizeof(uint32_t)):1u) 36 #define MCUXCLEXAMPLE_ALLOCATE_AND_INITIALIZE_RNG(pSession, rngCtxLength, mode) \ 37 uint32_t context[MCUXCLEXAMPLE_ALLOCATE_RNG_CTXT(rngCtxLength)] = {0}; \ 38 mcuxClRandom_Context_t pRng_ctx = (mcuxClRandom_Context_t)context; \ 41 MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(randomInit_result, randomInit_token, mcuxClRandom_init(pSession, \ 44 if((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClRandom_init) != randomInit_token) || (MCUXCLRANDOM_STATUS_OK != randomInit_result)) \ 46 return MCUXCLEXAMPLE_STATUS_ERROR; \ 48 MCUX_CSSL_FP_FUNCTION_CALL_END(); \ 50 MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(prngInit_result, prngInit_token, mcuxClRandom_ncInit(pSession)); \ 51 if((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClRandom_ncInit) != prngInit_token) || (MCUXCLRANDOM_STATUS_OK != prngInit_result)) \ 53 return MCUXCLEXAMPLE_STATUS_ERROR; \ 55 MCUX_CSSL_FP_FUNCTION_CALL_END(); 57 #define MCUXCLEXAMPLE_INITIALIZE_PRNG(session) \ 59 MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(prngInit_result, prngInit_token, mcuxClRandom_ncInit(session)); \ 60 if((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClRandom_ncInit) != prngInit_token) || (MCUXCLRANDOM_STATUS_OK != prngInit_result)) \ 62 return MCUXCLEXAMPLE_STATUS_ERROR; \ 64 MCUX_CSSL_FP_FUNCTION_CALL_END(); Top level header of mcuxClRandomModes component.
Top level header of mcuxClRandom component.
Provides the API for the CSSL flow protection mechanism.
Definition of function identifiers for the flow protection mechanism.