API reference / @evolu/common / Crypto / TimingSafeEqual

Type Alias: TimingSafeEqual()

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

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

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.

Parameters

ParameterType
aUint8Array
bUint8Array

Returns

boolean

See

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

Was this page helpful?