Creates Uint8Array buffers from hexadecimal strings, and vice versa.
npm install hex-array
var hexarray = ;hexarray
converts the given buffer to a string containing its hexadecimal representation.
array a Uint8Array buffer to convert.
options an optional object with the following members:
groupingthis number of hex bytes are grouped together with spaces between groups. 0 means no grouping is applied. 0 if unspecified.
rowlengththe number of groups which make up a row. When 0, no splitting into rows occurs. 0 if unspecified.
uppercaseif true, the output will be in uppercase. true by default.
return a hexadecimal string representing the buffer.
takes a string containing hexadecimal and returns the equivalent as a Uint8Array buffer.
string The string to convert. Whitespace is ignored. If an odd number of
characters are specified, it will act as if preceeded with a leading 0; that
is, "FFF" is equivalent to "0FFF".
return a Uint8Array array.