Class StandardHandlerUsingAes128
java.lang.Object
com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
com.itextpdf.kernel.crypto.securityhandler.StandardSecurityHandler
com.itextpdf.kernel.crypto.securityhandler.StandardHandlerUsingStandard40
com.itextpdf.kernel.crypto.securityhandler.StandardHandlerUsingStandard128
com.itextpdf.kernel.crypto.securityhandler.StandardHandlerUsingAes128
-
Field Summary
Fields inherited from class com.itextpdf.kernel.crypto.securityhandler.StandardHandlerUsingStandard40
arcfour, documentId, keyLength, metadataPad, pad
Fields inherited from class com.itextpdf.kernel.crypto.securityhandler.StandardSecurityHandler
permissions, PERMS_MASK_1_FOR_REVISION_2, PERMS_MASK_1_FOR_REVISION_3_OR_GREATER, PERMS_MASK_2, usedOwnerPassword
Fields inherited from class com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
extra, md5, mkey, nextObjectKey, nextObjectKeySize
-
Constructor Summary
ConstructorDescriptionStandardHandlerUsingAes128
(PdfDictionary encryptionDictionary, byte[] password, byte[] documentId, boolean encryptMetadata) StandardHandlerUsingAes128
(PdfDictionary encryptionDictionary, byte[] userPassword, byte[] ownerPassword, int permissions, boolean encryptMetadata, boolean embeddedFilesOnly, byte[] documentId) -
Method Summary
Modifier and TypeMethodDescriptionGets decryptor object.Gets a stream wrapper, responsible for encryption.void
setHashKeyForNextObject
(int objNumber, int objGeneration) Note: For most of the supported security handlers algorithm to calculate encryption key for particular object is the same.protected void
setSpecificHandlerDicEntries
(PdfDictionary encryptionDictionary, boolean encryptMetadata, boolean embeddedFilesOnly) Methods inherited from class com.itextpdf.kernel.crypto.securityhandler.StandardHandlerUsingStandard128
calculatePermissions, computeGlobalEncryptionKey, computeOwnerKey, computeUserKey, isValidPassword
Methods inherited from class com.itextpdf.kernel.crypto.securityhandler.StandardHandlerUsingStandard40
computeUserPassword
Methods inherited from class com.itextpdf.kernel.crypto.securityhandler.StandardSecurityHandler
equalsArray, generateOwnerPasswordIfNullOrEmpty, getIsoBytes, getPermissions, isUsedOwnerPassword, setPermissions, setStandardHandlerDicEntries
Methods inherited from class com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
getMkey, getNextObjectKey
-
Constructor Details
-
StandardHandlerUsingAes128
public StandardHandlerUsingAes128(PdfDictionary encryptionDictionary, byte[] userPassword, byte[] ownerPassword, int permissions, boolean encryptMetadata, boolean embeddedFilesOnly, byte[] documentId) -
StandardHandlerUsingAes128
public StandardHandlerUsingAes128(PdfDictionary encryptionDictionary, byte[] password, byte[] documentId, boolean encryptMetadata)
-
-
Method Details
-
getEncryptionStream
Description copied from class:SecurityHandler
Gets a stream wrapper, responsible for encryption.- Overrides:
-
getEncryptionStream
in classStandardHandlerUsingStandard40
- Parameters:
-
os
-OutputStream
to be wrapped - Returns:
-
OutputStreamEncryption
, responsible for encryption.
-
getDecryptor
Description copied from class:SecurityHandler
Gets decryptor object.- Overrides:
-
getDecryptor
in classStandardHandlerUsingStandard40
- Returns:
-
IDecryptor
-
setHashKeyForNextObject
public void setHashKeyForNextObject(int objNumber, int objGeneration) Description copied from class:SecurityHandler
Note: For most of the supported security handlers algorithm to calculate encryption key for particular object is the same.- Overrides:
-
setHashKeyForNextObject
in classSecurityHandler
- Parameters:
-
objNumber
- number of particular object for encryption -
objGeneration
- generation of particular object for encryption
-
setSpecificHandlerDicEntries
protected void setSpecificHandlerDicEntries(PdfDictionary encryptionDictionary, boolean encryptMetadata, boolean embeddedFilesOnly) - Overrides:
-
setSpecificHandlerDicEntries
in classStandardHandlerUsingStandard128
-