Class StandardSecurityHandler
java.lang.Object
com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
com.itextpdf.kernel.crypto.securityhandler.StandardSecurityHandler
- Direct Known Subclasses:
-
StandardHandlerUsingAes256
,StandardHandlerUsingStandard40
-
Field Summary
Modifier and TypeFieldDescriptionprotected long
protected static final int
protected static final int
protected static final int
protected boolean
Fields inherited from class com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
extra, md5, mkey, nextObjectKey, nextObjectKeySize
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static boolean
equalsArray
(byte[] ar1, byte[] ar2, int size) protected byte[]
generateOwnerPasswordIfNullOrEmpty
(byte[] ownerPassword) protected byte[]
getIsoBytes
(PdfString string) Gets bytes of String-value without considering encoding.long
boolean
protected void
setStandardHandlerDicEntries
(PdfDictionary encryptionDictionary, byte[] userKey, byte[] ownerKey) Methods inherited from class com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
getDecryptor, getEncryptionStream, setHashKeyForNextObject
-
Field Details
-
PERMS_MASK_1_FOR_REVISION_2
protected static final int PERMS_MASK_1_FOR_REVISION_2- See Also:
-
PERMS_MASK_1_FOR_REVISION_3_OR_GREATER
protected static final int PERMS_MASK_1_FOR_REVISION_3_OR_GREATER- See Also:
-
PERMS_MASK_2
protected static final int PERMS_MASK_2- See Also:
-
permissions
protected long permissions -
usedOwnerPassword
protected boolean usedOwnerPassword
-
-
Constructor Details
-
StandardSecurityHandler
public StandardSecurityHandler()
-
-
Method Details
-
getPermissions
public long getPermissions() -
isUsedOwnerPassword
public boolean isUsedOwnerPassword() -
setStandardHandlerDicEntries
protected void setStandardHandlerDicEntries(PdfDictionary encryptionDictionary, byte[] userKey, byte[] ownerKey) -
generateOwnerPasswordIfNullOrEmpty
protected byte[] generateOwnerPasswordIfNullOrEmpty(byte[] ownerPassword) -
getIsoBytes
Gets bytes of String-value without considering encoding.- Parameters:
-
string
- aPdfString
to get bytes from it - Returns:
- byte array
-
equalsArray
protected static boolean equalsArray(byte[] ar1, byte[] ar2, int size)
-