API Docs
    Preparing search index...

    Function hexToByteSequence

    • Converts a hexadecimal string to a Uint8Array.

      Handles the 0x / 0X prefix and odd-length hex strings.

      Parameters

      • hex: string

        The hex string, optionally prefixed with 0x or 0X

      Returns Uint8Array

      Byte array representation

      hexToByteSequence('0xFF');   // Uint8Array [255]
      hexToByteSequence('0F'); // Uint8Array [15] (padded)