14ce06407Schristos=pod 24ce06407Schristos 34ce06407Schristos=head1 NAME 44ce06407Schristos 54ce06407SchristosCRYPTO_memcmp - Constant time memory comparison 64ce06407Schristos 74ce06407Schristos=head1 SYNOPSIS 84ce06407Schristos 94ce06407Schristos #include <openssl/crypto.h> 104ce06407Schristos 114ce06407Schristos int CRYPTO_memcmp(const void *a, const void *b, size_t len); 124ce06407Schristos 134ce06407Schristos=head1 DESCRIPTION 144ce06407Schristos 154ce06407SchristosThe CRYPTO_memcmp function compares the B<len> bytes pointed to by B<a> and B<b> 164ce06407Schristosfor equality. 174ce06407SchristosIt takes an amount of time dependent on B<len>, but independent of the 184ce06407Schristoscontents of the memory regions pointed to by B<a> and B<b>. 194ce06407Schristos 204ce06407Schristos=head1 RETURN VALUES 214ce06407Schristos 22f30e0929SchristosCRYPTO_memcmp() returns 0 if the memory regions are equal and nonzero 234ce06407Schristosotherwise. 244ce06407Schristos 254ce06407Schristos=head1 NOTES 264ce06407Schristos 274ce06407SchristosUnlike memcmp(2), this function cannot be used to order the two memory regions 28f30e0929Schristosas the return value when they differ is undefined, other than being nonzero. 294ce06407Schristos 304ce06407Schristos=head1 COPYRIGHT 314ce06407Schristos 32*b0d17251SchristosCopyright 2019 The OpenSSL Project Authors. All Rights Reserved. 334ce06407Schristos 344ce06407SchristosLicensed under the Apache License 2.0 (the "License"). You may not use 354ce06407Schristosthis file except in compliance with the License. You can obtain a copy 364ce06407Schristosin the file LICENSE in the source distribution or at 374ce06407SchristosL<https://www.openssl.org/source/license.html>. 384ce06407Schristos 394ce06407Schristos=cut 40