Constant-time comparison of two Uint8Arrays.
Compares all bytes regardless of early mismatch to prevent timing attacks when checking secrets or authentication tags.
First byte array.
Second byte array.
true if both arrays are identical in length and content.
true
if (bytesEqual(expected, actual)) { // authenticated} Copy
if (bytesEqual(expected, actual)) { // authenticated}
Constant-time comparison of two Uint8Arrays.
Compares all bytes regardless of early mismatch to prevent timing attacks when checking secrets or authentication tags.