static fromHex(str) {
    const size = str.length / 2;
    const arr = new Uint8Array(size);
    for (let i = 0; i < size; i++) {
      arr[i] = window.parseInt(str.substr(i * 2, 2), 16);
    }
    return arr;
  }
Convert a hex string to a Uint8Array.
@param {string} str
@return {!Uint8Array}
@export