netatalk  4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
constant_time.h File Reference
#include <stddef.h>

Go to the source code of this file.

Functions

int atalk_ct_memcmp (const void *, const void *, size_t)
 Constant-time memory equality check.

Function Documentation

◆ atalk_ct_memcmp()

int atalk_ct_memcmp ( const void * a,
const void * b,
size_t n )
extern

Constant-time memory equality check.

Compares exactly n bytes and returns 0 if the buffers are equal, non-zero if they differ.

Note
Unlike memcmp(), this function does not provide lexicographic ordering and must not be used for sorting.
Returns
0 if the buffers are equal, non-zero if they differ.