Interface SecurityKeyPasswordInterface
- All Superinterfaces:
SecurityKey
This is a Security Key factory that
can be used to instantiate different varieties of the password-based Security Keys.
Note: When the abstract methods declared in this class are implemented
by the user, they will be contained in the objects that newInstance() methods return.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Get the document owner's password.byte[]Get the document user's password.makeSecurityKey(CosDocument pdfDoc, byte[] password, SecurityProvidersImpl providers) Create an object that represents this specified security password for this specified PDF document.Methods inherited from interface com.adobe.internal.pdftoolkit.core.securityframework.SecurityKey
getSecurityManager
-
Method Details
-
makeSecurityKey
SecurityKeyPasswordInterface makeSecurityKey(CosDocument pdfDoc, byte[] password, SecurityProvidersImpl providers) throws PDFSecurityException Create an object that represents this specified security password for this specified PDF document.
- Parameters:
pdfDoc- the PDF document representation for which to set the specified password.password- a byte array that holds the password for this document.- Returns:
- an object representing the security password for this document.
- Throws:
PDFSecurityException
-
getOwnerPassword
Get the document owner's password. This method can be called only after establishing the right to decrypt the PDFDocument was authenticated (that is, after the PDFDocument has been successfully unlock'ed).- Returns:
- a byte array with the owner password. The owner password
is Permissions in the Acrobat UI.
Return
nullif the document was unlocked with the user password. - Throws:
PDFParseExceptionPDFSecurityException
-
getUserPassword
Get the document user's password. This method can be called only after establishing the right to decrypt the document was authenticated (That is, after the PDFDocument has been unlock'ed}.- Returns:
- a byte array with the password. Returns the user (Open in the Acrobat UI) password regardless whether the document was unlocked with the user or owner password.
- Throws:
PDFParseExceptionPDFSecurityException
-