Decodes a lowercase or uppercase hexadecimal string to a Uint8Array.
The hex string (even length).
The decoded byte array.
If the string has odd length or invalid hex characters.
const bytes = fromHex('0fff');// Uint8Array [ 0x0f, 0xff ] Copy
const bytes = fromHex('0fff');// Uint8Array [ 0x0f, 0xff ]
Decodes a lowercase or uppercase hexadecimal string to a Uint8Array.