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

推荐订阅源

B
Blog RSS Feed
C
CERT Recently Published Vulnerability Notes
P
Proofpoint News Feed
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
云风的 BLOG
云风的 BLOG
H
Help Net Security
Recorded Future
Recorded Future
The Register - Security
The Register - Security
F
Full Disclosure
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
Security Archives - TechRepublic
Security Archives - TechRepublic
Simon Willison's Weblog
Simon Willison's Weblog
Cisco Talos Blog
Cisco Talos Blog
I
InfoQ
T
Tenable Blog
T
Tor Project blog
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
NISL@THU
NISL@THU
Google DeepMind News
Google DeepMind News
博客园 - 叶小钗
B
Blog
V
V2EX
Jina AI
Jina AI
L
LangChain Blog
月光博客
月光博客
W
WeLiveSecurity
U
Unit 42
AWS News Blog
AWS News Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
博客园 - 聂微东
V
Visual Studio Blog
A
Arctic Wolf
T
Tailwind CSS Blog
The Cloudflare Blog
SecWiki News
SecWiki News
S
SegmentFault 最新的问题
Hacker News - Newest:
Hacker News - Newest: "LLM"
宝玉的分享
宝玉的分享
MyScale Blog
MyScale Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Securelist
www.infosecurity-magazine.com
www.infosecurity-magazine.com
腾讯CDC
雷峰网
雷峰网

博客园 - 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);