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