Class EncryptionHeader
java.lang.Object
org.docx4j.org.apache.poi.poifs.crypt.EncryptionHeader
- All Implemented Interfaces:
Duplicatable,GenericRecord
- Direct Known Subclasses:
AgileEncryptionHeader,BinaryRC4EncryptionHeader,StandardEncryptionHeader,XOREncryptionHeader
Reads and processes OOXML Encryption Headers
The constants are largely based on ZIP constants.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract EncryptionHeadercopy()intintgetFlags()byte[]intintvoidsetBlockSize(int blockSize) protected voidsetChainingMode(ChainingMode chainingMode) 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.docx4j.org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordType
-
Constructor Details
-
EncryptionHeader
protected EncryptionHeader() -
EncryptionHeader
-
-
Method Details
-
getChainingMode
-
setChainingMode
-
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 interfaceDuplicatable- Returns:
- a deep copy of the implementing class / instance
-
getGenericProperties
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-