app/src/main/java/com/example/hybss/utils/Base64.java
private static String discardNonBase64Chars(String data) {

        StringBuilder sb = new StringBuilder();

        int length = data.length();

        for (int i = 0; i < length; i++) {
            if (isValidBase64Byte((byte) (data.charAt(i)))) {
                sb.append(data.charAt(i));
            }
        }

        return sb.toString();
    }
/**
     * Discards any characters outside of the base64 alphabet (see page 25 of RFC 2045) "Any characters outside of the
     * base64 alphabet are to be ignored in base64 encoded data."
     * 
     * @param data
     *            the base64 encoded data
     * @return the data, less non-base64 characters.
     */
Discards any characters outside of the base64 alphabet  "Any characters outside of the
base64 alphabet are to be ignored in base64 encoded data."

@param data
the base64 encoded data
@return the data, less non-base64 characters.
Discards any characters outside of the base64 alphabet " Any characters outside of the base64 alphabet are to be ignored in base64 encoded data . " @param data the base64 encoded data @return the data less non - base64 characters .
private static String discardNonBase64Chars(String data) {
        StringBuilder sb = new StringBuilder();
        int length = data.length();
        for (int i = 0; i < length; i++) {
            if (isValidBase64Byte((byte) (data.charAt(i)))) {
                sb.append(data.charAt(i));
            }
        }
        return sb.toString();
    }
private static String discardNonBase64Chars ( String data ) { StringBuilder sb = new StringBuilder ( ) ; int length = data . length ( ) ; for ( int i = 0 ; i < length ; i ++ ) { if ( isValidBase64Byte ( ( byte ) ( data . charAt ( i ) ) ) ) { sb . append ( data . charAt ( i ) ) ; } } return sb . toString ( ) ; }
Discards any characters outside of the base64 alphabet (see page 25 of RFC 2045) "Any characters outside of the
 base64 alphabet are to be ignored in base64 encoded data."
Discards any characters outside of the base64 alphabet ( see page 25 of RFC 2045 ) " Any characters outside of the base64 alphabet are to be ignored in base64 encoded data . "