What is the Base64 encoding/decoding?
ReportQuestion
Example 1
import org.apache.commons.codec.binary.Base64;
Base64 base64 = new Base64();
return new String(base64.encode(new String(AUTH_STRING_PROXY).getBytes()));
Example 2
sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();
String encodedUserPwd = encoder.encode("username:password".getBytes());
connection.setRequestProperty("Proxy-Authorization", "Basic " + encodedUserPwd);
Java 8 now provides an additional utility class for this ...
Please briefly explain why you feel this question should be reported .
0
Java
2 years
0 Answers
26 views