http://xiangai.taobao.com
http://shop148612228.taobao.com

encodeBase64URLSafe和encodeBase64区别

byte[] b = Base64.encodeBase64URLSafe(data.getBytes(ENCODING));

byte[] b = Base64.encodeBase64(data.getBytes(ENCODING));

区别在于encodeBase64会对字符串3位一组自动补全,因而最后可能会出现 == 或者 =

encodeBase64URLSafe则是按照字符串实际位数进行加密,最后若为1位,则不补全,不会出现 == 或者 =

posted @ 2020-09-18 11:14  万事俱备就差个程序员  阅读(2189)  评论(0编辑  收藏  举报

http://xiangai.taobao.com
http://shop148612228.taobao.com
如果您觉得对您有帮助.领个红包吧.谢谢.
支付宝红包
微信打赏 支付宝打赏