Function hextoui8a

  • convert from hexadecimal string to Uint8Array

    Parameters

    • hex: string

      hexadecimal string

    Returns Uint8Array

    Uint8Array of hex

    Description

    This function converts a hexadecimal string to a Uint8Array for it.

    Example

    hextoui8a("010001") -> Uint8Array(3) [1, 0, 1]
    hextoui8a("ffffabcd") -> Uint8Array(4) [255, 255, 171, 205]