package com.qmth.sop.common.util;

import com.qmth.sop.common.contant.SystemConstant;

import java.util.Base64;

public class Base64Util {

    public static String encode(byte[] input) {
        return new String(Base64.getEncoder().encode(input), SystemConstant.CHARSET);
    }

    public static byte[] decode(String input) {
        return Base64.getDecoder().decode(input.getBytes(SystemConstant.CHARSET));
    }
}
