mcuxCsslMemory_Compare Function Definitions More...
Functions | |
mcuxCsslMemory_Status_t | mcuxCsslMemory_Compare (mcuxCsslParamIntegrity_Checksum_t chk, void const *pLhs, void const *pRhs, size_t length) |
Compares the two memory regions lhs and rhs . | |
mcuxCsslMemory_Compare Function Definitions
mcuxCsslMemory_Status_t mcuxCsslMemory_Compare | ( | mcuxCsslParamIntegrity_Checksum_t | chk, |
void const * | pLhs, | ||
void const * | pRhs, | ||
size_t | length | ||
) |
Compares the two memory regions lhs
and rhs
.
The implementation is secure in the following aspects:
length
parameters, i.e. no branches are performed based on the data in pLhs
or pRhs
.chk | The parameter checksum, generated with mcuxCsslParamIntegrity_Protect. |
pLhs | The left-hand side data to compare. Must not be NULL. |
pRhs | The right-hand side data to compare. Must not be NULL. |
length | The number of bytes to compare. |
MCUXCSSLMEMORY_STATUS_EQUAL | If the contents of lhs and rhs are equal. |
MCUXCSSLMEMORY_STATUS_NOT_EQUAL | If the contents of lhs and rhs are not equal. |
MCUXCSSLMEMORY_STATUS_INVALID_PARAMETER | If one of the parameters was invalid (i.e. lhs or rhs was NULL or length was zero). |
MCUXCSSLMEMORY_STATUS_FAULT | If a fault was detected. |