String encode = Base64.encodeBase64String("Hello".getBytes());
System.out.println(encode);
byte[] decode = Base64.decodeBase64(encode);
System.out.println(decode.toString());
I can't tell whats wrong here. I've tried every possible combination there is. Set the charset, toString, no toString. The encode works perfectly. I can throw that number into a web decoder and get the right value every time. Just can't get this to work.
Output:
run:
SGVsbG8= (encode)
[B@1fb8ee3 (decode)
I can make it work if I use a for loop and manually add the characters to a string. But I thought toString did that for me?