• Creates a Uint8Array value from a Uint8Array, Buffer, string or hex input.

    Returns

    A (possibly empty) Uint8Array.

    Parameters

    • input: undefined | null | CryptoInput

      Input array or string. Null or undefined result in an empty array.

    • hexAsString: boolean = false

      Whether or not a hex string is encoded as a string instead of a number.

    Returns Uint8Array