PdfEncryptionDetails

Inheritance: java.lang.Object

public class PdfEncryptionDetails

Contains details for a PDF encryption.

Constructors

Constructor Description
PdfEncryptionDetails(String userPassword, String ownerPassword, int encryptionAlgorithm) Initializes a new instance of the PdfEncryptionDetails class.

Methods

Method Description
getEncryptionAlgorithm() Gets the encryption mode.
getOwnerPassword() Gets the Owner password.
getPermissions() Gets the permissions.
getUserPassword() Gets the User password.
setEncryptionAlgorithm(int value) Sets the encryption mode.
setOwnerPassword(String value) Sets the Owner password.
setPermissions(int value) Sets the permissions.
setUserPassword(String value) Sets the User password.

PdfEncryptionDetails(String userPassword, String ownerPassword, int encryptionAlgorithm)

public PdfEncryptionDetails(String userPassword, String ownerPassword, int encryptionAlgorithm)

Initializes a new instance of the PdfEncryptionDetails class.

Parameters:

Parameter Type Description
userPassword java.lang.String The user password allowing to open protected documents.
ownerPassword java.lang.String The owner password allowing to open protected documents.
encryptionAlgorithm int The PdfEncryptionAlgorithm instance which indicate encryption algorithm.

getEncryptionAlgorithm()

public final int getEncryptionAlgorithm()

Gets the encryption mode.

Returns: int - the encryption mode.

getOwnerPassword()

public final String getOwnerPassword()

Gets the Owner password.


Opening the document with the correct owner password (assuming it is not the same as the user password) allows full (owner) access to the document. This unlimited access includes the ability to change the document\u2019s passwords and access permissions.

Returns: java.lang.String - the Owner password.

getPermissions()

public final int getPermissions()

Gets the permissions.

Returns: int - the permissions.

getUserPassword()

public final String getUserPassword()

Gets the User password.


Opening the document with the correct user password (or opening a document that does not have a user password) allows additional operations to be performed according to the user access permissions specified in the document\u2019s encryption dictionary.

Returns: java.lang.String - the User password.

setEncryptionAlgorithm(int value)

public final void setEncryptionAlgorithm(int value)

Sets the encryption mode.

Parameters:

Parameter Type Description
value int the encryption mode.

setOwnerPassword(String value)

public final void setOwnerPassword(String value)

Sets the Owner password.


Opening the document with the correct owner password (assuming it is not the same as the user password) allows full (owner) access to the document. This unlimited access includes the ability to change the document\u2019s passwords and access permissions.

Parameters:

Parameter Type Description
value java.lang.String the Owner password.

setPermissions(int value)

public final void setPermissions(int value)

Sets the permissions.

Parameters:

Parameter Type Description
value int the permissions.

setUserPassword(String value)

public final void setUserPassword(String value)

Sets the User password.


Opening the document with the correct user password (or opening a document that does not have a user password) allows additional operations to be performed according to the user access permissions specified in the document\u2019s encryption dictionary.

Parameters:

Parameter Type Description
value java.lang.String the User password.