Class BinaryRC4Encryptor.BinaryRC4CipherOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.docx4j.org.apache.poi.poifs.crypt.ChunkedCipherOutputStream
org.docx4j.org.apache.poi.poifs.crypt.binaryrc4.BinaryRC4Encryptor.BinaryRC4CipherOutputStream
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
- Enclosing class:
- BinaryRC4Encryptor
protected class BinaryRC4Encryptor.BinaryRC4CipherOutputStream extends ChunkedCipherOutputStream
-
Field Summary
Fields inherited from class org.docx4j.org.apache.poi.poifs.crypt.ChunkedCipherOutputStream
chunkBits, chunkMask, chunkSizeFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
Constructors Constructor Description BinaryRC4CipherOutputStream(DirectoryNode dir) -
Method Summary
Modifier and Type Method Description protected voidcalculateChecksum(java.io.File file, int i)protected voidcreateEncryptionInfoEntry(DirectoryNode dir, java.io.File tmpFile)protected javax.crypto.CipherinitCipherForBlock(javax.crypto.Cipher cipher, int block, boolean lastChunk)Methods inherited from class org.docx4j.org.apache.poi.poifs.crypt.ChunkedCipherOutputStream
close, write, write, write, writeChunkMethods inherited from class java.io.FilterOutputStream
flushMethods inherited from class java.io.OutputStream
nullOutputStreamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
BinaryRC4CipherOutputStream
public BinaryRC4CipherOutputStream(DirectoryNode dir) throws java.io.IOException, java.security.GeneralSecurityException- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
-
Method Details
-
initCipherForBlock
protected javax.crypto.Cipher initCipherForBlock(javax.crypto.Cipher cipher, int block, boolean lastChunk) throws java.security.GeneralSecurityException- Specified by:
initCipherForBlockin classChunkedCipherOutputStream- Throws:
java.security.GeneralSecurityException
-
calculateChecksum
protected void calculateChecksum(java.io.File file, int i)- Specified by:
calculateChecksumin classChunkedCipherOutputStream
-
createEncryptionInfoEntry
protected void createEncryptionInfoEntry(DirectoryNode dir, java.io.File tmpFile) throws java.io.IOException, java.security.GeneralSecurityException- Specified by:
createEncryptionInfoEntryin classChunkedCipherOutputStream- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-