Class EncryptionHeader
java.lang.Object
org.docx4j.org.apache.poi.poifs.crypt.EncryptionHeader
- Direct Known Subclasses:
AgileEncryptionHeader,BinaryRC4EncryptionHeader,StandardEncryptionHeader
public abstract class EncryptionHeader
extends java.lang.Object
Reads and processes OOXML Encryption Headers
The constants are largely based on ZIP constants.
-
Field Summary
Fields Modifier and Type Field Description static intALGORITHM_AES_128static intALGORITHM_AES_192static intALGORITHM_AES_256static intALGORITHM_RC4static intHASH_NONEstatic intHASH_SHA1static intHASH_SHA256static intHASH_SHA384static intHASH_SHA512static intMODE_CBCstatic intMODE_CFBstatic intMODE_ECBstatic intPROVIDER_AESstatic intPROVIDER_RC4 -
Constructor Summary
Constructors Modifier Constructor Description protectedEncryptionHeader() -
Method Summary
Modifier and Type Method Description intgetAlgorithm()Deprecated.use getCipherAlgorithm()intgetBlockSize()ChainingModegetChainingMode()CipherAlgorithmgetCipherAlgorithm()intgetCipherMode()Deprecated.use getChainingMode().ecmaIdCipherProvidergetCipherProvider()java.lang.StringgetCspName()intgetFlags()intgetHashAlgorithm()Deprecated.use getHashAlgorithmEx()HashAlgorithmgetHashAlgorithmEx()byte[]getKeySalt()intgetKeySize()intgetProviderType()Deprecated.use getCipherProvider()intgetSizeExtra()protected voidsetBlockSize(int blockSize)protected voidsetChainingMode(ChainingMode chainingMode)protected voidsetCipherAlgorithm(CipherAlgorithm cipherAlgorithm)protected voidsetCipherProvider(CipherProvider providerType)protected voidsetCspName(java.lang.String cspName)protected voidsetFlags(int flags)protected voidsetHashAlgorithm(HashAlgorithm hashAlgorithm)protected voidsetKeySalt(byte[] salt)protected voidsetKeySize(int keyBits)protected voidsetSizeExtra(int sizeExtra)
-
Field Details
-
ALGORITHM_RC4
public static final int ALGORITHM_RC4 -
ALGORITHM_AES_128
public static final int ALGORITHM_AES_128 -
ALGORITHM_AES_192
public static final int ALGORITHM_AES_192 -
ALGORITHM_AES_256
public static final int ALGORITHM_AES_256 -
HASH_NONE
public static final int HASH_NONE -
HASH_SHA1
public static final int HASH_SHA1 -
HASH_SHA256
public static final int HASH_SHA256 -
HASH_SHA384
public static final int HASH_SHA384 -
HASH_SHA512
public static final int HASH_SHA512 -
PROVIDER_RC4
public static final int PROVIDER_RC4 -
PROVIDER_AES
public static final int PROVIDER_AES -
MODE_ECB
public static final int MODE_ECB -
MODE_CBC
public static final int MODE_CBC -
MODE_CFB
public static final int MODE_CFB
-
-
Constructor Details
-
EncryptionHeader
protected EncryptionHeader()
-
-
Method Details
-
getCipherMode
public int getCipherMode()Deprecated.use getChainingMode().ecmaId -
getChainingMode
-
setChainingMode
-
getFlags
public int getFlags() -
setFlags
protected void setFlags(int flags) -
getSizeExtra
public int getSizeExtra() -
setSizeExtra
protected void setSizeExtra(int sizeExtra) -
getAlgorithm
public int getAlgorithm()Deprecated.use getCipherAlgorithm() -
getCipherAlgorithm
-
setCipherAlgorithm
-
getHashAlgorithm
public int getHashAlgorithm()Deprecated.use getHashAlgorithmEx() -
getHashAlgorithmEx
-
setHashAlgorithm
-
getKeySize
public int getKeySize() -
setKeySize
protected void setKeySize(int keyBits) -
getBlockSize
public int getBlockSize() -
setBlockSize
protected void setBlockSize(int blockSize) -
getKeySalt
public byte[] getKeySalt() -
setKeySalt
protected void setKeySalt(byte[] salt) -
getProviderType
public int getProviderType()Deprecated.use getCipherProvider() -
getCipherProvider
-
setCipherProvider
-
getCspName
public java.lang.String getCspName() -
setCspName
protected void setCspName(java.lang.String cspName)
-