I am trying to decode a Base64 string from my authentication headers in Java. I am certain that the request being sent has a valid Base64 encoded string in the authentication header. Here is my decoding code:
HttpServletRequest request = (HttpServletRequest) req;
byte[] test = new Base64().decode(request.getHeader("Authorization"));
Before I decode the request it looks like this Basic dXNlcjpmZGdmcw==
After I try to decode it it looks like this: «"qÕÍ•È陑™Ì
I am not sure what I am doing wrong, and no matter what decode utility I use it always ends up looking like gibberish. Thanks for reading.