package com.ymwk.icvp.pki.utils; import java.io.IOException; import java.util.Base64; public class Base64Utils { public static byte[] decode(String str) throws IOException{ return Base64.getDecoder().decode(str); } public static String encode(byte[] bytes){ return new String(Base64.getEncoder().encode(bytes)); } }