24
Base64.encodeBase64("foobar".getBytes());
样品B(使用android.util.Base64):
Base64.encode("foobar".getBytes(), Base64.DEFAULT);
不要这些产生相同的字符串?
Base64.encodeBase64("foobar".getBytes());
样品B(使用android.util.Base64):
Base64.encode("foobar".getBytes(), Base64.DEFAULT);
不要这些产生相同的字符串?
不,区别在于,使用默认设置,Android的Base64包含行终止符。要获得与Apache编码相同的结果,请使用Base64.NO_WRAP。
希望我能给你+100上传。 –
你是男人 –
同样适用于android.util.Base64.decode()吗? –