CRYPTO_memcmp.pod 1.0 KB

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