edgeport - v1.0.3
    Preparing search index...

    Function fromHex

    • Decodes a hex string into bytes.

      Whitespace is ignored; the remaining input must be an even number of hex digits.

      Parameters

      • hex: string

        The hex string to decode.

      Returns Uint8Array

      The decoded bytes.

      If the input has an odd length or a non-hex character.

      1.0.3

      import { fromHex } from 'edgeport/util';

      fromHex('de ad be ef'); // Uint8Array [0xde, 0xad, 0xbe, 0xef]