I'm using android.util.Base64 to encode a username + password for HTTP Basic Authentication like so:
String encoded = Base64.encodeToString((username+":"+password).getBytes(), Base64.NO_WRAP);
If I used "user" & "pass" for the username and password I would expect to get dXNlcjpwYXNzCg== (from openssl)
echo 'user:pass' | openssl base64
but instead I get this:

Any ideas why this is?
Thanks,
Jake
Note: Simply passing the resulting string to a show progress dialog:
Tools.ShowProgress(encoded, Login.this);
echoprints a\ncharacter at the end of the line. avoid this with the-noption:echo -n "user:pass" | openssl base64