Class BinaryRC4Encryptor.BinaryRC4CipherOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.apache.poi.poifs.crypt.ChunkedCipherOutputStream
-
- org.apache.poi.poifs.crypt.binaryrc4.BinaryRC4Encryptor.BinaryRC4CipherOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
- BinaryRC4Encryptor
protected class BinaryRC4Encryptor.BinaryRC4CipherOutputStream extends ChunkedCipherOutputStream
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description BinaryRC4CipherOutputStream(OutputStream stream)
BinaryRC4CipherOutputStream(DirectoryNode dir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
calculateChecksum(File file, int i)
protected void
createEncryptionInfoEntry(DirectoryNode dir, File tmpFile)
void
flush()
protected Cipher
initCipherForBlock(Cipher cipher, int block, boolean lastChunk)
-
Methods inherited from class org.apache.poi.poifs.crypt.ChunkedCipherOutputStream
close, getChunk, getChunkMask, getPlainByteFlags, getPos, getTotalPos, initCipherForBlock, initCipherForBlockNoFlush, invokeCipher, setNextRecordSize, write, write, write, write, writeChunk, writePlain
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
BinaryRC4CipherOutputStream
public BinaryRC4CipherOutputStream(OutputStream stream) throws IOException, GeneralSecurityException
- Throws:
IOException
GeneralSecurityException
-
BinaryRC4CipherOutputStream
public BinaryRC4CipherOutputStream(DirectoryNode dir) throws IOException, GeneralSecurityException
- Throws:
IOException
GeneralSecurityException
-
-
Method Detail
-
initCipherForBlock
protected Cipher initCipherForBlock(Cipher cipher, int block, boolean lastChunk) throws GeneralSecurityException
- Specified by:
initCipherForBlock
in classChunkedCipherOutputStream
- Throws:
GeneralSecurityException
-
calculateChecksum
protected void calculateChecksum(File file, int i)
- Specified by:
calculateChecksum
in classChunkedCipherOutputStream
-
createEncryptionInfoEntry
protected void createEncryptionInfoEntry(DirectoryNode dir, File tmpFile) throws IOException, GeneralSecurityException
- Specified by:
createEncryptionInfoEntry
in classChunkedCipherOutputStream
- Throws:
IOException
GeneralSecurityException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classFilterOutputStream
- Throws:
IOException
-
-