Class StandardSecurityHandler
- java.lang.Object
-
- com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
-
- com.itextpdf.kernel.crypto.securityhandler.StandardSecurityHandler
-
- Direct Known Subclasses:
StandardHandlerUsingAes256
,StandardHandlerUsingStandard40
public abstract class StandardSecurityHandler extends SecurityHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected long
permissions
protected static int
PERMS_MASK_1_FOR_REVISION_2
protected static int
PERMS_MASK_1_FOR_REVISION_3_OR_GREATER
protected static int
PERMS_MASK_2
protected boolean
usedOwnerPassword
-
Fields inherited from class com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
extra, md5, mkey, nextObjectKey, nextObjectKeySize
-
-
Constructor Summary
Constructors Constructor Description StandardSecurityHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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
getPermissions()
boolean
isUsedOwnerPassword()
protected void
setStandardHandlerDicEntries(PdfDictionary encryptionDictionary, byte[] userKey, byte[] ownerKey)
-
Methods inherited from class com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
getDecryptor, getEncryptionStream, setHashKeyForNextObject
-
-
-
-
Field Detail
-
PERMS_MASK_1_FOR_REVISION_2
protected static final int PERMS_MASK_1_FOR_REVISION_2
- See Also:
- Constant Field Values
-
PERMS_MASK_1_FOR_REVISION_3_OR_GREATER
protected static final int PERMS_MASK_1_FOR_REVISION_3_OR_GREATER
- See Also:
- Constant Field Values
-
PERMS_MASK_2
protected static final int PERMS_MASK_2
- See Also:
- Constant Field Values
-
permissions
protected long permissions
-
usedOwnerPassword
protected boolean usedOwnerPassword
-
-
Method Detail
-
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
protected byte[] getIsoBytes(PdfString string)
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)
-
-