Base64 is free software used to encode 8-bit characters into ASCII printable characters, much like UUENCODE. However, unlike UUENCODE, Base64 doesn't embed a filename. It is commonly used for encoding digital certificates and passwords.
Base64 armouring is a variant that uses only the characters A-Z a-z 0-9 +/=. It is suitable for encoding binary data as SQL strings that will work regardless of the encoding. However, + / and = have special meaning in URLs, making it difficult to use Base64 in URLEncoded contexts. This is where Base64u comes in, which is a variant on Base64 that uses - _ and * in preference to + / and = so that it can be used in URLEncoded contexts with or without URLEncoding.
To use Base64 or Base64u, import com.mindprod.base64.Base64 and create an encoder object. For encoding byte[], set the line length and call the encoder method. For decoding byte[], call the decoder method. An example that starts and ends with a String can be found in Example.java. To run, use java.exe com.mindprod.base64.Example. Overall, Base64 and Base64u offer a convenient and flexible solution for encoding and decoding 8-bit characters.
Version 1.9: add icon and pad file