public static String encryptToString(byte[] plainBytes, Integer version) throws Exception {
        if (version == null) {
            // no encryption
            return new String(plainBytes, StandardCharsets.UTF_8);
        }
        byte[] keyBytes = getAesKeyByConfig(version).getBytes(StandardCharsets.UTF_8);
        return parseByte2HexStr(encrypt(plainBytes, keyBytes));
    }
Encrypt by key and current version
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/util/AESUtils.java