StandardSecurityHandler
Overview
StandardSecurityHandler is a class in Aspose.PDF FOSS for Java.
Standard security handler — validates passwords and produces encryption keys.
This class provides 7 methods for working with StandardSecurityHandler objects in Java programs.
Available methods include: StandardSecurityHandler, authenticate, authenticateOwnerPassword, authenticateUserPassword, getEncryptionDict, getEncryptionKey, isAuthenticated.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: authenticated, encryptionDict, encryptionKey.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
authenticated | boolean | Read | Gets the authenticated. |
encryptionKey | byte[] | Read | Gets the encryption key. |
encryptionDict | PDFEncryptionDict | Read | Gets the encryption dict. |
Methods
| Signature | Description |
|---|---|
StandardSecurityHandler(encDict: PDFEncryptionDict, documentId: byte[]) | Creates a security handler for the given encryption dictionary. |
authenticate(password: byte[]) → boolean | Tries to authenticate with the given password. |
authenticateUserPassword(password: byte[]) → boolean | Attempts authentication using only the user-password branch. |
authenticateOwnerPassword(password: byte[]) → boolean | Attempts authentication using only the owner-password branch. |
isAuthenticated() → boolean | Returns true if authenticated is set. |
getEncryptionKey() → byte[] | Returns the encryption key. |
getEncryptionDict() → PDFEncryptionDict | Returns the encryption dict. |