public static void generateEncryptedSubmission(File instanceXml,File submissionXml,EncryptedFormInformation formInfo) throws IOException, EncryptionException {
  if (!submissionXml.exists() || !submissionXml.isFile()) {
    throw new IOException("No submission.xml found");
  }
  List<File> mediaFiles=encryptSubmissionFiles(instanceXml,submissionXml,formInfo);
  writeSubmissionManifest(formInfo,submissionXml,mediaFiles);
}

public static void generateEncryptedSubmission ( File instanceXml , File submissionXml , EncryptedFormInformation formInfo ) throws IOException , EncryptionException { if ( ! submissionXml . exists ( ) || ! submissionXml . isFile ( ) ) { throw new IOException ( "No submission.xml found" ) ; } List < File > mediaFiles = encryptSubmissionFiles ( instanceXml , submissionXml , formInfo ) ; writeSubmissionManifest ( formInfo , submissionXml , mediaFiles ) ; }
constructs the encrypted attachments , encrypted form xml , and the plaintext submission manifest ( with signature ) for the form submission . does not delete any of the original files .
