Compare two Uint8Arrays using a constant-time style loop to reduce timing
side-channels when comparing sensitive data (e.g., mnemonic bytes, keys,
authentication tags). Does not early-return on the first difference:
work done depends only on the input lengths, so byte content does not affect timing.
When to use:
Use for secret or security-sensitive byte comparisons to avoid content-based timing leaks.
Prefer when inputs are fixed-length (or validated to equal length) at the API boundary.
Compare two Uint8Arrays using a constant-time style loop to reduce timing side-channels when comparing sensitive data (e.g., mnemonic bytes, keys, authentication tags). Does not early-return on the first difference: work done depends only on the input lengths, so byte content does not affect timing.
When to use:
Returns
Whether the Uint8Arrays are equal.