Package org.apache.poi.poifs.crypt
Class EncryptionHeader
java.lang.Object
org.apache.poi.poifs.crypt.EncryptionHeader
- All Implemented Interfaces:
org.apache.poi.common.Duplicatable,GenericRecord
- Direct Known Subclasses:
AgileEncryptionHeader,BinaryRC4EncryptionHeader,StandardEncryptionHeader,XOREncryptionHeader
public abstract class EncryptionHeader
extends Object
implements GenericRecord, org.apache.poi.common.Duplicatable
Reads and processes OOXML Encryption Headers
The constants are largely based on ZIP constants.
-
Method Summary
Modifier and TypeMethodDescriptionabstract EncryptionHeadercopy()intintgetFlags()byte[]intintvoidsetBlockSize(int blockSize) voidsetCipherAlgorithm(CipherAlgorithm cipherAlgorithm) voidsetCipherProvider(CipherProvider providerType) voidsetCspName(String cspName) voidsetFlags(int flags) voidsetHashAlgorithm(HashAlgorithm hashAlgorithm) voidsetKeySalt(byte[] salt) voidsetKeySize(int keyBits) Sets the keySize (in bits).voidsetSizeExtra(int sizeExtra) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordType
-
Method Details
-
getChainingMode
-
getFlags
public int getFlags() -
setFlags
public void setFlags(int flags) -
getSizeExtra
public int getSizeExtra() -
setSizeExtra
public void setSizeExtra(int sizeExtra) -
getCipherAlgorithm
-
setCipherAlgorithm
-
getHashAlgorithm
-
setHashAlgorithm
-
getKeySize
public int getKeySize() -
setKeySize
public void setKeySize(int keyBits) Sets the keySize (in bits). Before calling this method, make sure to set the cipherAlgorithm, as the amount of keyBits gets validated against the list of allowed keyBits of the corresponding cipherAlgorithm -
getBlockSize
public int getBlockSize() -
setBlockSize
public void setBlockSize(int blockSize) -
getKeySalt
public byte[] getKeySalt() -
setKeySalt
public void setKeySalt(byte[] salt) -
getCipherProvider
-
setCipherProvider
-
getCspName
-
setCspName
-
copy
- Specified by:
copyin interfaceorg.apache.poi.common.Duplicatable
-
getGenericProperties
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-