function uint8ArrToHex(uint8Arr) {
  let hex = "";
  for (const b of uint8Arr) {
    hex += b.toString(16).padStart(2, "0");
  }

  // Also possible (but less readable) -
  // let hex = "";
  // uint8Arr.forEach(b => hex += b.toString(16).padStart(2, "0"));

  return hex;
}
// Convert a UInt8Array to a hex string.
Convert a UInt8Array to a hex string.
Convert a UInt8Array to a hex string .
function uint8ArrToHex(uint8Arr) {
  let hex = "";
  for (const b of uint8Arr) {
    hex += b.toString(16).padStart(2, "0");
  }
  return hex;
}
function uint8ArrToHex ( uint8Arr ) { let hex = "" ; for ( const b of uint8Arr ) { hex += b . toString ( 16 ) . padStart ( 2 , "0" ) ; } return hex ; }
Convert a UInt8Array to a hex string.
Convert a UInt8Array to a hex string .
// Also possible (but less readable) - // let hex = ""; // uint8Arr.forEach(b => hex += b.toString(16).padStart(2, "0"));