[#CRYPTO_memcmp]
= CRYPTO&lowbar;memcmp
:mrdocs:

Compare two memory regions in constant time with respect to their contents&period;

== Synopsis

Declared in `&lt;openssl&sol;crypto&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CRYPTO&lowbar;memcmp(
    void const* in&lowbar;a,
    void const* in&lowbar;b,
    size&lowbar;t len);
----

== Description

Runtime depends on `len` but not on the data at `in&lowbar;a` &sol; `in&lowbar;b&period;` Unlike memcmp, the non&hyphen;zero return value must not be used to sort elements&period;

== Return Value

0 if the `len` bytes are equal&semi; non&hyphen;zero otherwise (ordering is undefined)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *in&lowbar;a*
| First buffer&period;
| *in&lowbar;b*
| Second buffer&period;
| *len*
| Number of bytes to compare&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
