Leancrypto 1.7.2
Post-Quantum Cryptographic Library
Functions
lc_memcmp_secure.h File Reference
#include "ext_headers.h"
+ Include dependency graph for lc_memcmp_secure.h:

Go to the source code of this file.

Functions

int lc_memcmp_secure (const void *s1, size_t s1n, const void *s2, size_t s2n)
 Constant-time memcmp implementation. More...
 

Function Documentation

◆ lc_memcmp_secure()

int lc_memcmp_secure ( const void *  s1,
size_t  s1n,
const void *  s2,
size_t  s2n 
)

Constant-time memcmp implementation.

Parameters
s1First string
s1nSize of first string
s2Second string
s2nSize of second string
Returns
0 on string match, != 0 when strings do not match