Package org.apache.poi.hslf.usermodel
Class HSLFSlideShowEncrypted
java.lang.Object
org.apache.poi.hslf.usermodel.HSLFSlideShowEncrypted
- All Implemented Interfaces:
Closeable,AutoCloseable
This class provides helper functions for encrypted PowerPoint documents.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHSLFSlideShowEncrypted(byte[] docstream, NavigableMap<Integer, Record> recordMap) protectedHSLFSlideShowEncrypted(byte[] docstream, NavigableMap<Integer, Record> recordMap, char[] password) protected -
Method Summary
Modifier and TypeMethodDescriptionprotected static Record[]addEncryptionRecord(Record[] records, DocumentEncryptionAtom dea) voidclose()protected voiddecryptPicture(byte[] pictstream, int offset) protected voiddecryptRecord(byte[] docstream, int persistId, int offset) protected voidencryptPicture(byte[] pictstream, int offset) protected OutputStreamencryptRecord(OutputStream plainStream, int persistId, Record record) protected EncryptionInfoprotected static Record[]normalizeRecords(Record[] records) remove duplicated UserEditAtoms and merge PersistPtrHolder.protected static Record[]removeEncryptionRecord(Record[] records) protected Record[]updateEncryptionRecord(Record[] records) Updates the encryption record for the given records, reading the password fromBiff8EncryptionKey.getCurrentUserPassword().protected Record[]updateEncryptionRecord(Record[] records, char[] password) Updates the encryption record for the given records using the supplied password.
-
Constructor Details
-
HSLFSlideShowEncrypted
-
-
Method Details
-
getDocumentEncryptionAtom
-
getEncryptionInfo
-
encryptRecord
-
decryptRecord
protected void decryptRecord(byte[] docstream, int persistId, int offset) -
decryptPicture
protected void decryptPicture(byte[] pictstream, int offset) -
encryptPicture
protected void encryptPicture(byte[] pictstream, int offset) -
updateEncryptionRecord
Updates the encryption record for the given records using the supplied password. Ifpasswordisnullany existing encryption record is removed (decrypted output).- Parameters:
records- the current record arraypassword- the output password, ornullto remove encryption- Returns:
- the updated record array
- Since:
- 6.0.0
-
updateEncryptionRecord
Updates the encryption record for the given records, reading the password fromBiff8EncryptionKey.getCurrentUserPassword().- Parameters:
records- the current record array- Returns:
- the updated record array
-
normalizeRecords
remove duplicated UserEditAtoms and merge PersistPtrHolder. Before this method is called, make sure that the offsets are correct, i.e. callHSLFSlideShowImpl.updateAndWriteDependantRecords(OutputStream, Map) -
removeEncryptionRecord
-
addEncryptionRecord
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-