Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

Uint8Array.fromHex()

2 tags 1 category

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.

Return value: A new Uint8Array object containing the decoded bytes from the hexadecimal string.

Parameters: string A hexadecimal string encoding bytes to convert to a Uint8Array. The string must: Have an even number of characters because two characters encode one byte. Only contain characters in the hexadecimal alphabet, which includes 0–9 and A–F (case-insensitive). Not contain whitespace (unlike Uint8Array.prototype.setFromBase64()).

Syntax example: Uint8Array.fromHex(string)

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…