sodium_memcmp

Constant-time test for equality.

WARNING: sodium_memcmp() must be used to verify if two secret keys are equal, in constant time. This function is not designed for lexicographical comparisons.

extern (C) @nogc nothrow pure
int
sodium_memcmp
(
const(void*) b1_
,
const(void*) b2_
,
size_t len
)

Return Value

Type: int

0 if the keys are equal, and -1 if they differ.

See Also

Meta