Leancrypto 0.12.0
Post-Quantum Cryptographic Library
Loading...
Searching...
No Matches
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.
 

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