I have one Base64 String YxRfXk827kPgkmMUX15PNg==
I want to convert it into 63145F5E4F36EE43E09263145F5E4F36
So I think scenario would be like this I have to first decode Base64 string and than convert it into Hex
My code is given below
import org.apache.commons.codec.binary.Base64;
String guid = "YxRfXk827kPgkmMUX15PNg==";
byte[] decoded = Base64.decodeBase64(guid);
try {
System.out.println(new String(decoded, "UTF-8") + "\n");
} catch (UnsupportedEncodingException e1) {
e1.printStackTrace();
}
Above code gives c_^O6?C??c_^O6
But I don't know How to convert this string into Hex string. So it gives the 63145F5E4F36EE43E09263145F5E4F36
output.
So please help me to fix this issue.