I am using node.js v4.5. Suppose I have this Uint8Array variable.
var uint8 = new Uint8Array(4); uint8[0] = 0x1f; uint8[1] = 0x2f; uint8[2] = 0x3f; uint8[3] = 0x4f;
This array can have any length, but let the length be 4.
I would like to have a function that converts uint8 to the equivalent of a hexadecimal string.
var hex_string = convertUint8_to_hexStr(uint8);
user6064424
source share