Skip to content

Function: fromHex() ​

fromHex(hex): Uint8Array

Defined in: utils.ts:61

Decodes hex (either case). Throws InvalidArgumentError on malformed input.

Parameters ​

hex ​

string

An even-length string of hex digits.

Returns ​

Uint8Array

The decoded bytes.

Throws ​

if hex is not a string, has odd length or contains a non-hex character.

Apache-2.0.