Does anyone know how to decode and encode a string in Base64 using Base64?
First: Choose an encoding. UTF-8 is generally a good choice; stick to an encoding which will definitely be valid on both sides. It would be rare to use something other than UTF-8 or UTF-16. Transmitting end: Encode the string to bytes (e.g. text.getBytes(encodingName)) Encode the bytes to base64 using the Base64 class Transmit the base64 … Read more