MCUX CLNS MCUX Crypto Library Normal Secure |

Functions
mcuxCsslMemory_Clear Function Definitions
MCUX CSSL &ndash; API » mcuxCssl Memory API » mcuxCssl Memory Clear

mcuxCsslMemory_Clear Function Definitions More...

## Functions
mcuxCsslMemory_ClearResult_t | mcuxCsslMemory_Clear (mcuxCsslParamIntegrity_Checksum_t chk, void *pDst, size_t dst_size, size_t cnt)
| Clear `cnt` bytes of data at `pDst`. More...

## Detailed Description

mcuxCsslMemory_Clear Function Definitions

## Function Documentation

## ◆ mcuxCsslMemory_Clear()

mcuxCsslMemory_ClearResult_t mcuxCsslMemory_Clear | ( | mcuxCsslParamIntegrity_Checksum_t | chk,
|  | void * | pDst,
|  | size_t | dst_size,
|  | size_t | cnt
| ) |  |

Clear `cnt` 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 `dst_size` bytes.

Parameters

  [in] | chk | The parameter checksum, generated with mcuxCsslParamIntegrity_Protect.
  [in] | pDst | The destination pointer to buffer to be cleared. Must not be NULL.
  [in] | dst_size | The size of the destination data buffer in bytes.
  [in] | cnt | The number of bytes to clear. Must be different from zero.

Returns
  A status code encapsulated in a flow-protection type.

Return values

  MCUXCSSLMEMORY_CLEAR_SUCCESS | If the contents in buffer at `pDst` is cleared.
  MCUXCSSLMEMORY_CLEAR_INVALID_PARAMETER | If one of the parameters is invalid.
  MCUXCSSLMEMORY_CLEAR_FAULT | If a fault was detected, included invalid checksum `chk`.