办学质量监测教学评价系统
ageer
2025-03-02 1385b165c9a62a486b4494ebb11320d3c1117a5e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package org.ruoyi.common.wechat.web.utils;
 
import org.apache.commons.codec.binary.Base64;
 
/**
 * @author WesleyOne
 * @create 2018/12/19
 */
public class Base64Util {
 
    /**
     * 编码
     * @param source
     * @return
     */
    public static String encode(String source){
        byte[] result = Base64.encodeBase64(source.getBytes());
        return result.toString();
    }
 
    /**
     * 解码
     * @param source
     * @return
     */
    public static String decode(String source){
        byte[] result = Base64.decodeBase64(source);
        return result.toString();
    }
}