From 1075139ca2b16229435c623fffbd58973d3970a7 Mon Sep 17 00:00:00 2001 From: Pauli Date: Mon, 24 Jun 2019 09:18:48 +1000 Subject: [PATCH] Add documentation for CRYPTO_memcmp. Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/9225) (cherry picked from commit 0ccff7a7ea82a921f780a483fc91c6b90a1378d9) --- doc/man3/CRYPTO_memcmp.pod | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 doc/man3/CRYPTO_memcmp.pod diff --git a/doc/man3/CRYPTO_memcmp.pod b/doc/man3/CRYPTO_memcmp.pod new file mode 100644 index 0000000000..9182d00796 --- /dev/null +++ b/doc/man3/CRYPTO_memcmp.pod @@ -0,0 +1,39 @@ +=pod + +=head1 NAME + +CRYPTO_memcmp - Constant time memory comparison + +=head1 SYNOPSIS + + #include + + int CRYPTO_memcmp(const void *a, const void *b, size_t len); + +=head1 DESCRIPTION + +The CRYPTO_memcmp function compares the B bytes pointed to by B and B +for equality. +It takes an amount of time dependent on B, but independent of the +contents of the memory regions pointed to by B and B. + +=head1 RETURN VALUES + +CRYPTO_memcmp() returns 0 if the memory regions are equal and non-zero +otherwise. + +=head1 NOTES + +Unlike memcmp(2), this function cannot be used to order the two memory regions +as the return value when they differ is undefined, other than being non-zero. + +=head1 COPYRIGHT + +Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the Apache License 2.0 (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. + +=cut -- 2.25.1