Base64 加密解密
发布日期:2021-06-29 11:16:22 浏览次数:4 分类:技术文章

本文共 361 字,大约阅读时间需要 1 分钟。

 代码:

public static void main(String[] args) {        String str = "abc123456";        String asB64 = new String(Base64.encodeBase64(str.getBytes()));//加密        System.out.println(asB64);        String str2 = new String(Base64.decodeBase64(asB64.getBytes()));//解密        System.out.println(str2);    }

 输出如下:

YWJjMTIzNDU2abc123456Process finished with exit code 0

 

转载地址:https://blog.csdn.net/zwp19952009/article/details/94399919 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Excel表格身份证号显示不完整问题
下一篇:java8 LocalDate 根据时间获取星期几

发表评论

最新留言

很好
[***.229.124.182]2024年04月02日 14时34分08秒