package com.ag.util;

import java.util.Base64;

public class Base64Util {

    public static String encode(String string){
        Base64.Encoder encoder = Base64.getEncoder();
        return encoder.encodeToString(string.getBytes());
    }

    public static String decode(String string){
        Base64.Decoder decoder = Base64.getDecoder();
        return new String(decoder.decode(string));
    }
}
