// Path: src/main/java/com/tkhoon/framework/Constant.java
// public interface Constant {
// 
//     String DEFAULT_CHARSET = "UTF-8";
// 
//     String APP_HOME_PAGE = "app.home_page";
//     String APP_JSP_PATH = "app.jsp_path";
//     String APP_WWW_PATH = "app.www_path";
// 
//     String SERVLET_DEFAULT = "default";
//     String SERVLET_JSP = "jsp";
//     String SERVLET_UPLOAD = "upload";
// 
//     String REQUEST_FAVICON = "/favicon.ico";
//     String REQUEST_UPLOAD = "/upload.do";
// 
//     String UPLOAD_BASE_PATH = "upload/";
//     String UPLOAD_PATH_NAME = "path";
//     String UPLOAD_INPUT_NAME = "file";
//     String UPLOAD_FILE_NAME = "file_name";
//     String UPLOAD_FILE_TYPE = "file_type";
//     String UPLOAD_FILE_SIZE = "file_size";
// 
//     String PLUGIN_PACKAGE = "com.tkhoon.plugin";
// }


import com.tkhoon.framework.Constant;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.UUID;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.log4j.Logger;
package com.tkhoon.framework.util;


public class CodecUtil {

    private static final Logger logger = Logger.getLogger(CodecUtil.class);

    // 将字符串 UTF-8 编码
    public static String encodeUTF8(String str) {
        String target;
        try {
// Path: src/main/java/com/tkhoon/framework/Constant.java
// public interface Constant {
// 
//     String DEFAULT_CHARSET = "UTF-8";
// 
//     String APP_HOME_PAGE = "app.home_page";
//     String APP_JSP_PATH = "app.jsp_path";
//     String APP_WWW_PATH = "app.www_path";
// 
//     String SERVLET_DEFAULT = "default";
//     String SERVLET_JSP = "jsp";
//     String SERVLET_UPLOAD = "upload";
// 
//     String REQUEST_FAVICON = "/favicon.ico";
//     String REQUEST_UPLOAD = "/upload.do";
// 
//     String UPLOAD_BASE_PATH = "upload/";
//     String UPLOAD_PATH_NAME = "path";
//     String UPLOAD_INPUT_NAME = "file";
//     String UPLOAD_FILE_NAME = "file_name";
//     String UPLOAD_FILE_TYPE = "file_type";
//     String UPLOAD_FILE_SIZE = "file_size";
// 
//     String PLUGIN_PACKAGE = "com.tkhoon.plugin";
// }


// Path: src/main/java/com/tkhoon/framework/util/CodecUtil.java
import com.tkhoon.framework.Constant;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.UUID;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.log4j.Logger;

package com.tkhoon.framework.util;


public class CodecUtil {

    private static final Logger logger = Logger.getLogger(CodecUtil.class);

    // 将字符串 UTF-8 编码
    public static String encodeUTF8(String str) {
        String target;
        try {
            target = URLEncoder.encode(str, Constant.DEFAULT_CHARSET);