how to convert hex string into base64 ? I found this page http://home2.paulschou.net/tools/xlate/ but I need some function in java: String base64 = ...decoder(String hex); I found something in the Internet but they are to difficult and use byte array. I am looking for something simplier thx a lot
String base64 = ...decoder(String hex);
Have a look at Commons Codec :
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Hex; byte[] decodedHex = Hex.decodeHex(hex); byte[] encodedHexB64 = Base64.encodeBase64(decodedHex);
1.4m articles
1.4m replys
5 comments
56.9k users