如何本地转换字符串 - > base64和base64 - >串 [英] How to native convert string -> base64 and base64 -> string
本文介绍了如何本地转换字符串 - > base64和base64 - >串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何本地转换字符串 - > base64 和 base64 - > 字符串
$ b
我发现只有这 bytes to base64string
会这样:
String Base64String.encode();
String Base64String.decode();
或从其他语言移植更容易吗?
解决方案
您可以使用 CryptoUtils.bytesToBase64 ,并使用 CryptoUtils.base64StringToBytes 。
How to native convert string -> base64 and base64 -> string
I'm find only this bytes to base64string
would like this:
String Base64String.encode();
String Base64String.decode();
or ported from another language is easier?
解决方案
You can decode base64 with CryptoUtils.bytesToBase64 and encode with CryptoUtils.base64StringToBytes.
这篇关于如何本地转换字符串 - > base64和base64 - >串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文