Base64 编码器和解码器

2022-01-21 00:00:00 base64 android java encoder decoder

Android 中是否有用于字符串的 base-64 解码器和编码器?

Is there a base-64 decoder and encoder for a String in Android?

推荐答案

参见<代码>android.util.Base64

这似乎是在 API 版本 8 或 android 2.2 中添加的,因此它不会在旧平台上可用.

It seems that this was added in API version 8 or android 2.2 so it will not be available on the older platforms.

但它的来源在 android/util/Base64.java 因此,如果需要,可以将其原封不动地复制到旧版本中.

But the source of it is at android/util/Base64.java so if needed one could just copy it unchanged for older versions.

相关文章