Top Inners Fields Constructors Methods
org.apache.poi.poifs.crypt.binaryrc4

public Class BinaryRC4Encryptor

extends Encryptor
Class Inheritance
Imports
java.io.File, .IOException, .OutputStream, java.security.GeneralSecurityException, .MessageDigest, .SecureRandom, javax.crypto.Cipher, .SecretKey, org.apache.poi.EncryptedDocumentException, org.apache.poi.poifs.crypt.ChunkedCipherOutputStream, .CryptoFunctions, .DataSpaceMapUtils, .EncryptionInfo, .Encryptor, .HashAlgorithm, org.apache.poi.poifs.crypt.standard.EncryptionRecord, org.apache.poi.poifs.filesystem.DirectoryNode, org.apache.poi.util.RandomSingleton

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class

Field Summary

Modifier and TypeField and Description
private int
Inherited from org.apache.poi.poifs.crypt.Encryptor:
DEFAULT_POIFS_ENTRY

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
public void
public void
confirmPassword(String password, byte[] keySpec, byte[] keySalt, byte[] verifier, byte[] verifierSalt, byte[] integritySalt)

Implements abstract org.apache.poi.poifs.crypt.Encryptor.confirmPassword.

public BinaryRC4Encryptor
protected void
public OutputStream
getDataStream(DirectoryNode
the node to write to
dir
)

Implements abstract org.apache.poi.poifs.crypt.Encryptor.getDataStream.

Return an output stream for encrypted data.

public BinaryRC4Encryptor.BinaryRC4CipherOutputStream
protected int
public void
setChunkSize(int
the chunk size, i.e. the block size with the same encryption key
chunkSize
)

Overrides org.apache.poi.poifs.crypt.Encryptor.setChunkSize.

Sets the chunk size of the data stream.

Inherited from org.apache.poi.poifs.crypt.Encryptor:
getDataStreamgetEncryptionInfogetGenericPropertiesgetInstancegetSecretKeysetEncryptionInfosetSecretKey

Field Detail

chunkSizeback to summary
private int chunkSize

Constructor Detail

BinaryRC4Encryptorback to summary
protected BinaryRC4Encryptor()
BinaryRC4Encryptorback to summary
protected BinaryRC4Encryptor(BinaryRC4Encryptor other)

Method Detail

confirmPasswordback to summary
public void confirmPassword(String password)

Implements abstract org.apache.poi.poifs.crypt.Encryptor.confirmPassword.

Annotations
@Override
confirmPasswordback to summary
public void confirmPassword(String password, byte[] keySpec, byte[] keySalt, byte[] verifier, byte[] verifierSalt, byte[] integritySalt)

Implements abstract org.apache.poi.poifs.crypt.Encryptor.confirmPassword.

Annotations
@Override
copyback to summary
public BinaryRC4Encryptor copy()

Implements abstract org.apache.poi.poifs.crypt.Encryptor.copy.

Annotations
@Override
createEncryptionInfoEntryback to summary
protected void createEncryptionInfoEntry(DirectoryNode dir) throws IOException
getDataStreamback to summary
public OutputStream getDataStream(DirectoryNode dir) throws IOException, GeneralSecurityException

Implements abstract org.apache.poi.poifs.crypt.Encryptor.getDataStream.

Doc from org.apache.poi.poifs.crypt.Encryptor.getDataStream.

Return an output stream for encrypted data.

Parameters
dir:DirectoryNode

the node to write to

Returns:OutputStream

encrypted stream

Annotations
@Override
getDataStreamback to summary
public BinaryRC4Encryptor.BinaryRC4CipherOutputStream getDataStream(OutputStream stream, int initialOffset) throws IOException, GeneralSecurityException

Overrides org.apache.poi.poifs.crypt.Encryptor.getDataStream.

Annotations
@Override
getKeySizeInBytesback to summary
protected int getKeySizeInBytes()
setChunkSizeback to summary
public void setChunkSize(int chunkSize)

Overrides org.apache.poi.poifs.crypt.Encryptor.setChunkSize.

Doc from org.apache.poi.poifs.crypt.Encryptor.setChunkSize.

Sets the chunk size of the data stream. Needs to be set before the data stream is requested. When not set, the implementation uses method specific default values

Parameters
chunkSize:int

the chunk size, i.e. the block size with the same encryption key

Annotations
@Override
org.apache.poi.poifs.crypt.binaryrc4 back to summary

protected Class BinaryRC4Encryptor.BinaryRC4CipherOutputStream

extends ChunkedCipherOutputStream
Class Inheritance

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
public void
flush()

Overrides java.io.FilterOutputStream.flush.

Implements java.io.Flushable.flush.

Flushes this output stream and forces any buffered output bytes to be written out to the stream.

protected Cipher
Inherited from org.apache.poi.poifs.crypt.ChunkedCipherOutputStream:
closegetChunkgetChunkMaskgetPlainByteFlagsgetPosgetTotalPosinitCipherForBlockinitCipherForBlockNoFlushinvokeCiphersetNextRecordSizewritewritewritewritewriteChunkwritePlain

Constructor Detail

BinaryRC4CipherOutputStreamback to summary
public BinaryRC4CipherOutputStream(OutputStream stream) throws IOException, GeneralSecurityException
BinaryRC4CipherOutputStreamback to summary
public BinaryRC4CipherOutputStream(DirectoryNode dir) throws IOException, GeneralSecurityException

Method Detail

calculateChecksumback to summary
protected void calculateChecksum(File file, int i)

Implements abstract org.apache.poi.poifs.crypt.ChunkedCipherOutputStream.calculateChecksum.

Annotations
@Override
createEncryptionInfoEntryback to summary
protected void createEncryptionInfoEntry(DirectoryNode dir, File tmpFile) throws IOException, GeneralSecurityException

Implements abstract org.apache.poi.poifs.crypt.ChunkedCipherOutputStream.createEncryptionInfoEntry.

Annotations
@Override
flushback to summary
public void flush() throws IOException

Overrides java.io.FilterOutputStream.flush.

Implements java.io.Flushable.flush.

Doc from java.io.FilterOutputStream.flush.

Flushes this output stream and forces any buffered output bytes to be written out to the stream.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
initCipherForBlockback to summary
protected Cipher initCipherForBlock(Cipher cipher, int block, boolean lastChunk) throws GeneralSecurityException

Implements abstract org.apache.poi.poifs.crypt.ChunkedCipherOutputStream.initCipherForBlock.

Annotations
@Override