private static CharSequence condenseByteString(String hexString) {

		if (!StringUtils.containsAny(hexString, ' ', ',')) {
			return hexString;
		}

		String[] parts = hexString.split("[ ,]");
		StringBuilder buffy = new StringBuilder();
		for (String s : parts) {
			if (s.length() == 1) {
				s = "0" + s;
			}
			buffy.append(s);
		}

		return buffy;
	}
Parse hexadecimal digits into a byte array.

@param hexString hexadecimal digits
@return numeric value as a byte array, or null if string contains invalid hex characters.
Ghidra/Framework/Generic/src/main/java/ghidra/util/NumericUtilities.java