code: function(str) {
  		if (str instanceof Uint8Array) return str;
  		if (!is_hex(str)) {
        throw new TypeError("The provided string doesn't look like hex data");
      }
      var result = new Uint8Array(str.length / 2);
      for (var i = 0; i < str.length; i += 2) {
        result[i >>> 1] = parseInt(str.substr(i, 2), 16);
      }
      return result;
    }
docs: Hexdecimal encoding helpers