1CRYPTO_MEMCMP(3) OpenSSL CRYPTO_MEMCMP(3)
2
3
4
6 CRYPTO_memcmp - Constant time memory comparison
7
9 #include <openssl/crypto.h>
10
11 int CRYPTO_memcmp(const void *a, const void *b, size_t len);
12
14 The CRYPTO_memcmp function compares the len bytes pointed to by a and b
15 for equality. It takes an amount of time dependent on len, but
16 independent of the contents of the memory regions pointed to by a and
17 b.
18
20 CRYPTO_memcmp() returns 0 if the memory regions are equal and non-zero
21 otherwise.
22
24 Unlike memcmp(2), this function cannot be used to order the two memory
25 regions as the return value when they differ is undefined, other than
26 being non-zero.
27
29 Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
30
31 Licensed under the Apache License 2.0 (the "License"). You may not use
32 this file except in compliance with the License. You can obtain a copy
33 in the file LICENSE in the source distribution or at
34 <https://www.openssl.org/source/license.html>.
35
36
37
381.1.1g 2020-04-23 CRYPTO_MEMCMP(3)