MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
mcuxCsslMemory_Set Function Definitions

mcuxCsslMemory_Set Function Definitions More...

Functions

mcuxCsslMemory_Status_t mcuxCsslMemory_Set (mcuxCsslParamIntegrity_Checksum_t chk, void *pDst, uint8_t val, size_t length, size_t bufLength)
 Set length bytes of data at pDst.
 

Detailed Description

mcuxCsslMemory_Set Function Definitions

Function Documentation

◆ mcuxCsslMemory_Set()

mcuxCsslMemory_Status_t mcuxCsslMemory_Set ( mcuxCsslParamIntegrity_Checksum_t  chk,
void *  pDst,
uint8_t  val,
size_t  length,
size_t  bufLength 
)

Set length bytes of data at pDst.

The implementation is secure in the following aspects: Parameter integrity protection: the function returns immediately in case of an incorrect parameter checksum. Code flow protection: the function call is protected. Buffer overflow protection: no data is written to pDst beyond bufLength bytes.

Parameters
[in]chkThe parameter checksum, generated with mcuxCsslParamIntegrity_Protect.
[in]pDstThe destination pointer to buffer to be set. Must not be NULL.
[in]valThe byte value to be set.
[in]lengthThe size in bytes to set.
[in]bufLengthThe buffer size (if bufLength < length, only bufLength bytes are set).
Returns
A status code encapsulated in a flow-protection type.
Return values
MCUXCSSLMEMORY_STATUS_OKIf val set length times at pDst.
MCUXCSSLMEMORY_STATUS_INVALID_PARAMETERIf one of the parameters is invalid.
MCUXCSSLMEMORY_STATUS_FAULTIf a fault was detected, included invalid checksum chk.