org.apache.poi.poifs.crypt.binaryrc4
Class BinaryRC4Encryptor.BinaryRC4CipherOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.apache.poi.poifs.crypt.ChunkedCipherOutputStream
              extended by org.apache.poi.poifs.crypt.binaryrc4.BinaryRC4Encryptor.BinaryRC4CipherOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable
Enclosing class:
BinaryRC4Encryptor

protected class BinaryRC4Encryptor.BinaryRC4CipherOutputStream
extends ChunkedCipherOutputStream


Field Summary
 
Fields inherited from class org.apache.poi.poifs.crypt.ChunkedCipherOutputStream
chunkBits, chunkMask, chunkSize
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
BinaryRC4Encryptor.BinaryRC4CipherOutputStream(DirectoryNode dir)
           
 
Method Summary
protected  void calculateChecksum(java.io.File file, int i)
           
protected  void createEncryptionInfoEntry(DirectoryNode dir, java.io.File tmpFile)
           
protected  javax.crypto.Cipher initCipherForBlock(javax.crypto.Cipher cipher, int block, boolean lastChunk)
           
 
Methods inherited from class org.apache.poi.poifs.crypt.ChunkedCipherOutputStream
close, write, write, write, writeChunk
 
Methods inherited from class java.io.FilterOutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryRC4Encryptor.BinaryRC4CipherOutputStream

public BinaryRC4Encryptor.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 class ChunkedCipherOutputStream
Throws:
java.security.GeneralSecurityException

calculateChecksum

protected void calculateChecksum(java.io.File file,
                                 int i)
Specified by:
calculateChecksum in class ChunkedCipherOutputStream

createEncryptionInfoEntry

protected void createEncryptionInfoEntry(DirectoryNode dir,
                                         java.io.File tmpFile)
                                  throws java.io.IOException,
                                         java.security.GeneralSecurityException
Specified by:
createEncryptionInfoEntry in class ChunkedCipherOutputStream
Throws:
java.io.IOException
java.security.GeneralSecurityException


Copyright 2016 The Apache Software Foundation or its licensors, as applicable.