• Converts the input to a Uint8Array.

    Parameters

    • input: string | number | Uint8Array

      The input to be converted to a Uint8Array. This can be a string, number, Uint8Array, or a hex string.

    Returns Uint8Array

    The Uint8Array representation of the input.

    Throws an error if the input type is not string, number, Uint8Array, or hex string.