Skip to content

coToUInt8

coToUInt8(input, hexAsString): Uint8Array

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

Parameters

input: any

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

A (possibly empty) Uint8Array.

Source

utils/src/Crypto.ts:80