@adviser/cement - v0.0.0
    Preparing search index...

    Function UInt8ArrayEqual

    • Compares two Uint8Arrays for byte-by-byte equality.

      Returns true only if both arrays have the same length and identical bytes at every position. Useful for comparing binary data, hashes, etc.

      Parameters

      • a: Uint8Array

        First Uint8Array to compare

      • b: Uint8Array

        Second Uint8Array to compare

      Returns boolean

      True if arrays are equal, false otherwise

      const a = new Uint8Array([1, 2, 3]);
      const b = new Uint8Array([1, 2, 3]);
      const c = new Uint8Array([1, 2, 4]);

      UInt8ArrayEqual(a, b); // true
      UInt8ArrayEqual(a, c); // false