code: function hexToBytes(hex) {
      var arr = new Uint8Array(Math.ceil(hex.length / 2));
      for (var i = 0; i < arr.length; i++) {
          arr[i] = parseInt(hex.substr(i * 2, 2), 16);
      }
      return arr;
  }
docs: Convert hex-string to byte array
  @param {string} hex
  @return Uint8Array