Package com.xxl.tool.encrypt
Class Base64Tool
java.lang.Object
com.xxl.tool.encrypt.Base64Tool
base64 tool
- Author:
- xuxueli 2025-04
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdecodeStandard(String data) 标准Base64解码static byte[]decodeStandardToBytes(String data) 标准Base64解码static StringdecodeUrlSafe(String data) URL安全的Base64解码static byte[]decodeUrlSafeToBytes(String data) URL安全的Base64解码static StringencodeStandard(byte[] data) 标准Base64编码static StringencodeStandard(String data) 标准Base64编码 1、示例: SGVsbG8rV29ybGQvMTIzPw 2、场景:普通字符串、二进制数据、邮件static StringencodeUrlSafe(byte[] data) URL安全的Base64编码(无填充)static StringencodeUrlSafe(String data) URL安全的Base64编码(无填充) 1、示例:SGVsbG8rV29ybGQvMTIzPw== 2、场景:JWT、URL参数、文件名
-
Constructor Details
-
Base64Tool
public Base64Tool()
-
-
Method Details
-
encodeUrlSafe
URL安全的Base64编码(无填充) 1、示例:SGVsbG8rV29ybGQvMTIzPw== 2、场景:JWT、URL参数、文件名 -
encodeUrlSafe
URL安全的Base64编码(无填充) -
decodeUrlSafe
URL安全的Base64解码 -
decodeUrlSafeToBytes
URL安全的Base64解码 -
encodeStandard
标准Base64编码 1、示例: SGVsbG8rV29ybGQvMTIzPw 2、场景:普通字符串、二进制数据、邮件 -
encodeStandard
标准Base64编码 -
decodeStandard
标准Base64解码 -
decodeStandardToBytes
标准Base64解码
-