c3r-cli-spark/src/main/java/com/amazonaws/c3r/spark/cli/EncryptMode.java [257:343]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                .overwrite(optionalArgs.overwrite)
                .csvInputNullValue(optionalArgs.csvInputNullValue)
                .csvOutputNullValue(optionalArgs.csvOutputNullValue)
                .secretKey(keyMaterial)
                .salt(requiredArgs.getId().toString())
                .settings(getClientSettings())
                .tableSchema(tableSchema)
                .build();
    }

    /**
     * All the configuration information needed specifically for Parquet files.
     *
     * @return All the settings on processing Parquet data
     */
    public ParquetConfig getParquetConfig() {
        return ParquetConfig.builder().binaryAsString(optionalArgs.parquetBinaryAsString).build();
    }

    /**
     * Ensure required settings exist.
     *
     * @throws C3rIllegalArgumentException If user input is invalid
     */
    private void validate() {
        FileUtil.verifyReadableFile(requiredArgs.getSchema());
        if (requiredArgs.getId() == null || requiredArgs.getId().toString().isBlank()) {
            throw new C3rIllegalArgumentException("Specified collaboration identifier is blank.");
        }
    }

    /**
     * Log information about how the data is being encrypted.
     *
     * @param columnSchemas Description of how input data should be transformed during the encryption process
     */
    void printColumCategoryInfo(final List<ColumnSchema> columnSchemas) {
        if (columnSchemas.isEmpty()) {
            return;
        }
        log.info("{} {} column{} being generated:",
                columnSchemas.size(),
                columnSchemas.get(0).getType(),
                columnSchemas.size() > 1 ? "s" : "");
        for (var c : columnSchemas) {
            log.info("  * " + c.getTargetHeader());
        }
    }

    /**
     * Print summary information about what will be in the encrypted output.
     *
     * @param tableSchema How data will be transformed during encryption
     */
    private void printColumnTransformInfo(final TableSchema tableSchema) {
        final var sealedColumns = new ArrayList<ColumnSchema>();
        final var fingerprintColumns = new ArrayList<ColumnSchema>();
        final var cleartextColumns = new ArrayList<ColumnSchema>();

        for (var c : tableSchema.getColumns()) {
            switch (c.getType()) {
                case SEALED:
                    sealedColumns.add(c);
                    break;
                case FINGERPRINT:
                    fingerprintColumns.add(c);
                    break;
                default:
                    cleartextColumns.add(c);
                    break;

            }
        }
        printColumCategoryInfo(sealedColumns);
        printColumCategoryInfo(fingerprintColumns);
        printColumCategoryInfo(cleartextColumns);
    }

    /**
     * Encrypt data for upload to an AWS Clean Rooms.
     *
     * @return {@link Main#SUCCESS} if no errors, else {@link Main#FAILURE}
     */
    @Override
    public Integer call() {
        try {
            validate();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



c3r-cli/src/main/java/com/amazonaws/c3r/cli/EncryptMode.java [255:341]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                .overwrite(optionalArgs.overwrite)
                .csvInputNullValue(optionalArgs.csvInputNullValue)
                .csvOutputNullValue(optionalArgs.csvOutputNullValue)
                .secretKey(keyMaterial)
                .salt(requiredArgs.getId().toString())
                .settings(getClientSettings())
                .tableSchema(tableSchema)
                .build();
    }

    /**
     * All the configuration information needed specifically for Parquet files.
     *
     * @return All the settings on processing Parquet data
     */
    public ParquetConfig getParquetConfig() {
        return ParquetConfig.builder().binaryAsString(optionalArgs.parquetBinaryAsString).build();
    }

    /**
     * Ensure required settings exist.
     *
     * @throws C3rIllegalArgumentException If user input is invalid
     */
    private void validate() {
        FileUtil.verifyReadableFile(requiredArgs.getSchema());
        if (requiredArgs.getId() == null || requiredArgs.getId().toString().isBlank()) {
            throw new C3rIllegalArgumentException("Specified collaboration identifier is blank.");
        }
    }

    /**
     * Log information about how the data is being encrypted.
     *
     * @param columnSchemas Description of how input data should be transformed during the encryption process
     */
    void printColumCategoryInfo(final List<ColumnSchema> columnSchemas) {
        if (columnSchemas.isEmpty()) {
            return;
        }
        log.info("{} {} column{} being generated:",
                columnSchemas.size(),
                columnSchemas.get(0).getType(),
                columnSchemas.size() > 1 ? "s" : "");
        for (var c : columnSchemas) {
            log.info("  * " + c.getTargetHeader());
        }
    }

    /**
     * Print summary information about what will be in the encrypted output.
     *
     * @param tableSchema How data will be transformed during encryption
     */
    private void printColumnTransformInfo(final TableSchema tableSchema) {
        final var sealedColumns = new ArrayList<ColumnSchema>();
        final var fingerprintColumns = new ArrayList<ColumnSchema>();
        final var cleartextColumns = new ArrayList<ColumnSchema>();

        for (var c : tableSchema.getColumns()) {
            switch (c.getType()) {
                case SEALED:
                    sealedColumns.add(c);
                    break;
                case FINGERPRINT:
                    fingerprintColumns.add(c);
                    break;
                default:
                    cleartextColumns.add(c);
                    break;

            }
        }
        printColumCategoryInfo(sealedColumns);
        printColumCategoryInfo(fingerprintColumns);
        printColumCategoryInfo(cleartextColumns);
    }

    /**
     * Encrypt data for upload to an AWS Clean Rooms.
     *
     * @return {@link Main#SUCCESS} if no errors, else {@link Main#FAILURE}
     */
    @Override
    public Integer call() {
        try {
            validate();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



