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