Is there any difference between Apache's Base64.encodeBase64 and Android's Base64.encode with Base64.Default flag?

后端 未结 1 1152
既然无缘
既然无缘 2020-12-24 12:30

Sample A (using org.apache.commons.codec.binary.Base64):

Base64.encodeBase64(\"foobar\".getBytes()); 

Sample B (using android.util.Base64):

相关标签:
1条回答
  • 2020-12-24 13:12

    No, the difference is that with the default settings, Android's Base64 includes line terminators. To obtain the same result as with the Apache encoding, use Base64.NO_WRAP.

    0 讨论(0)
提交回复
热议问题