Compare two memory regions in constant time with respect to their contents.
Declared in <openssl/crypto.h>
int
CRYPTO_memcmp(
void const* in_a,
void const* in_b,
size_t len);
Runtime depends on len but not on the data at in_a / in_b. Unlike memcmp, the non-zero return value must not be used to sort elements.
0 if the len bytes are equal; non-zero otherwise (ordering is undefined).
| Name | Description |
|---|---|
| in_a | First buffer. |
| in_b | Second buffer. |
| len | Number of bytes to compare. |