惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Spread Privacy
Spread Privacy
P
Palo Alto Networks Blog
P
Proofpoint News Feed
AI
AI
Help Net Security
Help Net Security
S
Securelist
T
Troy Hunt's Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
Cisco Blogs
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
Vercel News
Vercel News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
B
Blog
GbyAI
GbyAI
Recent Commits to openclaw:main
Recent Commits to openclaw:main
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed
S
Security Affairs
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
T
Tenable Blog
H
Help Net Security
NISL@THU
NISL@THU
F
Fortinet All Blogs
博客园_首页
G
GRAHAM CLULEY
L
LINUX DO - 最新话题
P
Privacy International News Feed
G
Google Developers Blog
博客园 - Franky
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Security Archives - TechRepublic
Security Archives - TechRepublic
The Register - Security
The Register - Security
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
量子位
C
Cyber Attacks, Cyber Crime and Cyber Security
Forbes - Security
Forbes - Security
S
Secure Thoughts
Simon Willison's Weblog
Simon Willison's Weblog
D
Docker
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
L
Lohrmann on Cybersecurity
T
Tailwind CSS Blog

博客园 - coffee

apache配置http跳转https centos7使用yum安装mysql5.7 Jboot实现Redis操作事件通知 使用命令修改git的用户名和提交的邮箱 apache,请求来源特定域名,重定向到图片域名。 使用cron+php脚本监控后台任务脚本 Shell_exec php with nohup git常用命令 Jenkins+Gitee异常解决 kafka安装和简单测试 statsvn使用小记 java.net.URLEncoder对中文的编码和解码 Apache配置WebSocket代理 php批量检查https证书有效期 504 Gateway Time-out ( Nginx + PHP ) 解决小计 VMware 扩展磁盘容量 查看mysql字符集、修改数据库、数据表、字段字符集 Docker常用命令 Docker 安装 MySQL 学习笔记
sun.misc.BASE64Encoder找不到jar包的解决方法
coffee · 2020-02-11 · via 博客园 - coffee

以下内容转载自:
https://blog.csdn.net/qq_29178991/article/details/79666924
非常谢谢原作者。

import sun.misc.BASE64Encoder;
import sun.misc.BASE64Decoder;

在项目中涉及到64位编码,有时开发会用到JDK中自带的BASE64工具。

但sun公司是不建议这样做的,尤其是更新了JDK版本,项目甚至还存在保存的信息。

可引用 

import org.apache.commons.codec.binary.Base64;

进行替换

一种解决方案:

原来使用的JDK自带jar包中的

return new BASE64Encoder().encode(encrypted);

替换为

import org.apache.commons.codec.binary.Base64;
return Base64.encodeBase64String(encrypted);

byte[] encrypted1 = new BASE64Decoder().decodeBuffer(text);

替换为

import org.apache.commons.codec.binary.Base64;
byte[] encrypted1 =Base64.decodeBase64(text);