Interface SecurityKeyPasswordInterface
-
- All Superinterfaces:
SecurityKey
public interface SecurityKeyPasswordInterface extends 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
getOwnerPassword()
Get the document owner's password.byte[]
getUserPassword()
Get the document user's password.SecurityKeyPasswordInterface
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 Detail
-
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
byte[] getOwnerPassword() throws PDFParseException, PDFSecurityException
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
null
if the document was unlocked with the user password. - Throws:
PDFParseException
PDFSecurityException
-
getUserPassword
byte[] getUserPassword() throws PDFParseException, PDFSecurityException
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:
PDFParseException
PDFSecurityException
-
-