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 . | |
mcuxCsslMemory_Set Function Definitions
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.
[in] | chk | The parameter checksum, generated with mcuxCsslParamIntegrity_Protect. |
[in] | pDst | The destination pointer to buffer to be set. Must not be NULL. |
[in] | val | The byte value to be set. |
[in] | length | The size in bytes to set. |
[in] | bufLength | The buffer size (if bufLength < length, only bufLength bytes are set). |
MCUXCSSLMEMORY_STATUS_OK | If val set length times at pDst . |
MCUXCSSLMEMORY_STATUS_INVALID_PARAMETER | If one of the parameters is invalid. |
MCUXCSSLMEMORY_STATUS_FAULT | If a fault was detected, included invalid checksum chk . |