MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClMemory_Clear

This function clears a memory region. More...

Macros

#define MCUXCLMEMORY_FP_MEMORY_CLEAR(pTarget, byteLen)
 Helper macro to call mcuxClMemory_clear with flow protection. More...
 
#define MCUXCLMEMORY_FP_MEMORY_CLEAR_WITH_BUFF(pTarget, byteLen, buffLen)
 Helper macro to call mcuxClMemory_clear with flow protection with buffer. More...
 

Functions

void mcuxClMemory_clear (uint8_t *pDst, size_t length, size_t bufLength)
 Overwrites a memory buffer with null bytes. More...
 

Detailed Description

This function clears a memory region.

Macro Definition Documentation

◆ MCUXCLMEMORY_FP_MEMORY_CLEAR

#define MCUXCLMEMORY_FP_MEMORY_CLEAR (   pTarget,
  byteLen 
)

Helper macro to call mcuxClMemory_clear with flow protection.

◆ MCUXCLMEMORY_FP_MEMORY_CLEAR_WITH_BUFF

#define MCUXCLMEMORY_FP_MEMORY_CLEAR_WITH_BUFF (   pTarget,
  byteLen,
  buffLen 
)

Helper macro to call mcuxClMemory_clear with flow protection with buffer.

Function Documentation

◆ mcuxClMemory_clear()

void mcuxClMemory_clear ( uint8_t *  pDst,
size_t  length,
size_t  bufLength 
)

Overwrites a memory buffer with null bytes.

If the destination buffer is too small, i.e. if bufLength < length, (length-bufLength) is added to the Flow Protection token (see Flow Protection API).

Parameters
[out]pDstPointer to the buffer to be cleared.
[in]lengthsize (in bytes) to be cleared.
[in]bufLengthbuffer size (if bufLength < length, only bufLength bytes are cleared).