简单的Base64 的 工具类,
package com.example.demo.util;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import java.io.IOException;
public class Base64Util {
public static byte[] decryptBASE64(String key) throws IOException {
return new BASE64Decoder().decodeBuffer(key);
}
public static String encryptBASE64(byte[] key){
return new BASE64Encoder().encodeBuffer(key);
}
}