public static String encrypt3DES(String data, String key) {
        try {
            SecretKey desKey = new SecretKeySpec(build3DesKey(key),
                    KEY_ALGORITHM_3DES);
            Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM_3DES);
            cipher.init(Cipher.ENCRYPT_MODE, desKey);
            return encryptBASE64(cipher.doFinal(data.getBytes(ENCODING)));
        } catch (Exception e) {
            return null;
        }
    }
encrypt by 3DES
@param data it is data to be encrypted
@param key  the key of encryption
@return
inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/function/EncryptFunction.java