constantTimeEquals

Compares this ByteArray with another in constant time to prevent timing attacks.

This method ensures that the comparison takes the same amount of time regardless of the input, making it suitable for cryptographic operations where timing attacks are a concern. The arrays are padded to the same length before comparison to handle unequal sizes securely.

Return

true if the arrays are equal, false otherwise.

Parameters

other

The ByteArray to compare with.

See also