use of org.apache.poi.poifs.crypt.cryptoapi.CryptoAPIEncryptor in project poi by apache.
the class HSLFSlideShowImpl method writeProperties.
/**
* Writes out the standard Documment Information Properties (HPSF)
*
* @param outFS the POIFSFileSystem to write the properties into
* @param writtenEntries a list of POIFS entries to add the property names too
* @throws IOException if an error when writing to the
* {@link POIFSFileSystem} occurs
*/
@Override
protected void writeProperties(NPOIFSFileSystem outFS, List<String> writtenEntries) throws IOException {
super.writeProperties(outFS, writtenEntries);
DocumentEncryptionAtom dea = getDocumentEncryptionAtom();
if (dea != null) {
CryptoAPIEncryptor enc = (CryptoAPIEncryptor) dea.getEncryptionInfo().getEncryptor();
try {
// ignore OutputStream
enc.getSummaryEntries(outFS.getRoot());
} catch (IOException e) {
throw e;
} catch (GeneralSecurityException e) {
throw new IOException(e);
}
}
}
Aggregations