ts-algochat
    Preparing search index...

    Function uint8ArrayEquals

    • Compares two Uint8Arrays for equality in constant time.

      Uses XOR accumulation to avoid early-return timing side-channels. The length check short-circuits (leaks length difference only, which is not secret in any AlgoChat usage), but the content comparison always examines every byte regardless of where a mismatch occurs.

      Parameters

      • a: Uint8Array
      • b: Uint8Array

      Returns boolean