private static StringBuilder normalizeHex(StringBuilder hex, int step) {
        // strip and white space
        int length = hex.length();
        for (int i = 0; i < length; i++) {
            if (isNoneHexChar(hex.charAt(i))) {
                hex.deleteCharAt(i);
                length--;
                i--;
            }
        }
        length = hex.length();
        if (step == 2){
            // add 0's to uneven length
            if (length % 2 != 0) {
                hex.append('0');
            }
        }
        if (step == 4){
            if (length % 4 != 0) {
                hex.append("00");
            }
        }
        return hex;
    }