Class AgileEncryptionVerifier

java.lang.Object
org.apache.poi.poifs.crypt.EncryptionVerifier
org.apache.poi.poifs.crypt.agile.AgileEncryptionVerifier
All Implemented Interfaces:
org.apache.poi.common.Duplicatable, GenericRecord

public class AgileEncryptionVerifier extends EncryptionVerifier
Used when checking if a key is valid for a document
  • Constructor Details

  • Method Details

    • setSalt

      public void setSalt(byte[] salt)
      Overrides:
      setSalt in class EncryptionVerifier
    • setEncryptedVerifier

      public void setEncryptedVerifier(byte[] encryptedVerifier)
      Overrides:
      setEncryptedVerifier in class EncryptionVerifier
    • setEncryptedVerifierHash

      public void setEncryptedVerifierHash(byte[] encryptedVerifierHash)
      Overrides:
      setEncryptedVerifierHash in class EncryptionVerifier
    • setEncryptedKey

      public void setEncryptedKey(byte[] encryptedKey)
      Overrides:
      setEncryptedKey in class EncryptionVerifier
    • copy

      public AgileEncryptionVerifier copy()
      Specified by:
      copy in interface org.apache.poi.common.Duplicatable
      Specified by:
      copy in class EncryptionVerifier
    • getKeySize

      public int getKeySize()
      The keysize (in bits) of the verifier data. This usually equals the keysize of the header, but only on a few exceptions, like files generated by Office for Mac, can be different.
      Returns:
      the keysize (in bits) of the verifier.
    • getBlockSize

      public int getBlockSize()
      The blockSize (in bytes) of the verifier data. This usually equals the blocksize of the header.
      Returns:
      the blockSize (in bytes) of the verifier,
    • setKeySize

      public void setKeySize(int keyBits)
      Sets the keysize (in bits) of the verifier
      Parameters:
      keyBits - the keysize (in bits)
    • setBlockSize

      public void setBlockSize(int blockSize)
      Sets the blockSize (in bytes) of the verifier
      Parameters:
      blockSize - the blockSize (in bytes)
    • setCipherAlgorithm

      public final void setCipherAlgorithm(CipherAlgorithm cipherAlgorithm)
      Overrides:
      setCipherAlgorithm in class EncryptionVerifier