API reference › @evolu/common › Crypto › TimingSafeEqual

type TimingSafeEqual = (a: Uint8Array, b: Uint8Array) => boolean;

Defined in: packages/common/src/Crypto.ts:405

Performs a timing-safe comparison of two Uint8Arrays. Returns true if they are equal, false otherwise. Takes constant time regardless of where the arrays differ. Arrays of different lengths are unequal, and the comparison does not hide their lengths.

See

https://nodejs.org/api/crypto.html#cryptotimingsafeequala-b