I am wondering which library to use for base64 encoding/decoding? I need this functionality be stable enough for production use.
I am wondering which library to use for base64 encoding/decoding? I need this functionality
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Java 9
Use the Java 8 solution. Note DatatypeConverter can still be used, but it is now within the
java.xml.bindmodule which will need to be included.Java 8
Java 8 now provides
java.util.Base64for encoding and decoding base64.Encoding
Decoding
Java 6 and 7
Since Java 6 the lesser known class
javax.xml.bind.DatatypeConvertercan be used. This is part of the JRE, no extra libraries required.Encoding
Decoding