The Uint8Array.fromHex()
static method creates a new Uint8Array
object from a hexadecimal string.
This method parses the string into a byte array. To convert the string into a single number, use the parseInt()
function with radix
set to 16
instead.