public static void (String str) { String code = Base64.getEncoder().encodeToString(str.getBytes()); System.out.println(str + " -> " + code); }
public static void decodeBase64(String code) { byte[] str = Base64.getDecoder().decode(code.getBytes()); System.out.println(code + " -> " + new String(str)); }
|
近期评论