ctEqual

fnbool ctEqual(const(ubyte)[] a, const(ubyte)[] b) pure nothrow @nogc @safe

Compares two byte arrays in constant time.

This function always examines all bytes regardless of whether a mismatch is found, preventing timing attacks that could determine the position of the first differing byte.

Parameters

aFirst byte array to compare.
bSecond byte array to compare.

Returns

true if the arrays have the same length and content,

false otherwise.