public static String encrypt(String data, String key, String method) {
        if (KEY_ALGORITHM_3DES.equals(method)) {
            return encrypt3DES(data, key);
        } else if (KEY_ALGORITHM_AES.equals(method)) {
            return encryptAES(data, key);
        } else {
            return null;
        }
    }
encrypt method

@param data it is data to be encrypted
@param key the key of encryption
@param method encryption algorithm
@return
inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/function/EncryptFunction.java