Package org.apache.poi.poifs.crypt.agile
Class AgileEncryptionVerifier
- java.lang.Object
-
- org.apache.poi.poifs.crypt.EncryptionVerifier
-
- org.apache.poi.poifs.crypt.agile.AgileEncryptionVerifier
-
- All Implemented Interfaces:
Duplicatable,GenericRecord
public class AgileEncryptionVerifier extends EncryptionVerifier
Used when checking if a key is valid for a document
-
-
Constructor Summary
Constructors Modifier Constructor Description AgileEncryptionVerifier(String descriptor)AgileEncryptionVerifier(AgileEncryptionVerifier other)protectedAgileEncryptionVerifier(EncryptionDocument ed)AgileEncryptionVerifier(CipherAlgorithm cipherAlgorithm, HashAlgorithm hashAlgorithm, int keyBits, int blockSize, ChainingMode chainingMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgileEncryptionVerifiercopy()intgetBlockSize()The blockSize (in bytes) of the verifier data.intgetKeySize()The keysize (in bits) of the verifier data.voidsetBlockSize(int blockSize)Sets the blockSize (in bytes) of the verifiervoidsetCipherAlgorithm(CipherAlgorithm cipherAlgorithm)voidsetEncryptedKey(byte[] encryptedKey)voidsetEncryptedVerifier(byte[] encryptedVerifier)voidsetEncryptedVerifierHash(byte[] encryptedVerifierHash)voidsetKeySize(int keyBits)Sets the keysize (in bits) of the verifiervoidsetSalt(byte[] salt)-
Methods inherited from class org.apache.poi.poifs.crypt.EncryptionVerifier
getChainingMode, getCipherAlgorithm, getEncryptedKey, getEncryptedVerifier, getEncryptedVerifierHash, getGenericProperties, getHashAlgorithm, getSalt, getSpinCount, setChainingMode, setHashAlgorithm, setSpinCount
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordType
-
-
-
-
Constructor Detail
-
AgileEncryptionVerifier
public AgileEncryptionVerifier(String descriptor)
-
AgileEncryptionVerifier
protected AgileEncryptionVerifier(EncryptionDocument ed)
-
AgileEncryptionVerifier
public AgileEncryptionVerifier(CipherAlgorithm cipherAlgorithm, HashAlgorithm hashAlgorithm, int keyBits, int blockSize, ChainingMode chainingMode)
-
AgileEncryptionVerifier
public AgileEncryptionVerifier(AgileEncryptionVerifier other)
-
-
Method Detail
-
setSalt
public void setSalt(byte[] salt)
- Overrides:
setSaltin classEncryptionVerifier
-
setEncryptedVerifier
public void setEncryptedVerifier(byte[] encryptedVerifier)
- Overrides:
setEncryptedVerifierin classEncryptionVerifier
-
setEncryptedVerifierHash
public void setEncryptedVerifierHash(byte[] encryptedVerifierHash)
- Overrides:
setEncryptedVerifierHashin classEncryptionVerifier
-
setEncryptedKey
public void setEncryptedKey(byte[] encryptedKey)
- Overrides:
setEncryptedKeyin classEncryptionVerifier
-
copy
public AgileEncryptionVerifier copy()
- Specified by:
copyin interfaceDuplicatable- Specified by:
copyin classEncryptionVerifier- Returns:
- a deep copy of the implementing class / instance
-
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:
setCipherAlgorithmin classEncryptionVerifier
-
-