Related questions
Encoding as Base64 in Java
I need to encode some data in the Base64 encoding in Java. How do I do that? What is the name of the class that provides a Base64 encoder?
I tried to use the sun.misc.BASE64Encoder class, without …
Base64 Java encode and decode a string
I want to encode a string into base64 and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
import javax.xml.bind.DatatypeConverter;
public …
Base 64 encode and decode example code
Does anyone know how to decode and encode a string in Base64 using the Base64. I am using the following code, but it's not working.
String source = "password";
byte[] byteArray = source.getBytes("UTF-16");
Base64 bs = new Base64();
//bs.encodeBytes(byteArray);
…