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 Details

    • getChainingMode

      public ChainingMode getChainingMode()
    • getFlags

      public int getFlags()
    • setFlags

      public void setFlags(int flags)
    • getSizeExtra

      public int getSizeExtra()
    • setSizeExtra

      public void setSizeExtra(int sizeExtra)
    • getCipherAlgorithm

      public CipherAlgorithm getCipherAlgorithm()
    • setCipherAlgorithm

      public void setCipherAlgorithm(CipherAlgorithm cipherAlgorithm)
    • getHashAlgorithm

      public HashAlgorithm getHashAlgorithm()
    • setHashAlgorithm

      public void setHashAlgorithm(HashAlgorithm hashAlgorithm)
    • 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

      public CipherProvider getCipherProvider()
    • setCipherProvider

      public void setCipherProvider(CipherProvider providerType)
    • getCspName

      public String getCspName()
    • setCspName

      public void setCspName(String cspName)
    • copy

      public abstract EncryptionHeader copy()
      Specified by:
      copy in interface org.apache.poi.common.Duplicatable
    • getGenericProperties

      public Map<String,Supplier<?>> getGenericProperties()
      Specified by:
      getGenericProperties in interface GenericRecord