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:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
- Enclosing class:
- BinaryRC4Encryptor
protected class BinaryRC4Encryptor.BinaryRC4CipherOutputStream extends ChunkedCipherOutputStream
-
-
Constructor Summary
Constructors Constructor Description BinaryRC4CipherOutputStream(java.io.OutputStream stream)
BinaryRC4CipherOutputStream(DirectoryNode dir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
calculateChecksum(java.io.File file, int i)
protected void
createEncryptionInfoEntry(DirectoryNode dir, java.io.File tmpFile)
void
flush()
protected javax.crypto.Cipher
initCipherForBlock(javax.crypto.Cipher cipher, int block, boolean lastChunk)
-
Methods inherited from class org.apache.poi.poifs.crypt.ChunkedCipherOutputStream
close, getChunk, getChunkMask, getPlainByteFlags, getPos, getTotalPos, initCipherForBlock, invokeCipher, setNextRecordSize, write, write, write, write, writeChunk, writePlain
-
-
-
-
Constructor Detail
-
BinaryRC4CipherOutputStream
public BinaryRC4CipherOutputStream(java.io.OutputStream stream) throws java.io.IOException, java.security.GeneralSecurityException
- Throws:
java.io.IOException
java.security.GeneralSecurityException
-
BinaryRC4CipherOutputStream
public BinaryRC4CipherOutputStream(DirectoryNode dir) throws java.io.IOException, java.security.GeneralSecurityException
- Throws:
java.io.IOException
java.security.GeneralSecurityException
-
-
Method Detail
-
initCipherForBlock
protected javax.crypto.Cipher initCipherForBlock(javax.crypto.Cipher cipher, int block, boolean lastChunk) throws java.security.GeneralSecurityException
- Specified by:
initCipherForBlock
in classChunkedCipherOutputStream
- Throws:
java.security.GeneralSecurityException
-
calculateChecksum
protected void calculateChecksum(java.io.File file, int i)
- Specified by:
calculateChecksum
in classChunkedCipherOutputStream
-
createEncryptionInfoEntry
protected void createEncryptionInfoEntry(DirectoryNode dir, java.io.File tmpFile) throws java.io.IOException, java.security.GeneralSecurityException
- Specified by:
createEncryptionInfoEntry
in classChunkedCipherOutputStream
- Throws:
java.io.IOException
java.security.GeneralSecurityException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.FilterOutputStream
- Throws:
java.io.IOException
-
-