Ordo  0.3.4
Symmetric Cryptography Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
utils.h File Reference

Utility. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ORDO_PUBLIC int ctcmp (const void *x, const void *y, size_t len)
 

Detailed Description

Utility.

This header contains utility functions, which are of use to developers who will use the library, for instance, constant-time comparisons, and so on.

Function Documentation

ORDO_PUBLIC int ctcmp ( const void *  x,
const void *  y,
size_t  len 
)

Performs a constant-time comparison between two buffers.

Parameters
[in]xThe 1st buffer.
[in]yThe 2nd buffer.
[in]lenLength in bytes.
Returns
Returns a positive value if the buffers match, 0 otherwise.
Warning
This function is for equality only, not ordering.