PdfEncryptionDetails

Inheritance: java.lang.Object

public class PdfEncryptionDetails

Contains details for a PDF encryption.

Constructors

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

Methods

MethodDescription
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:

ParameterTypeDescription
userPasswordjava.lang.StringThe user password allowing to open protected documents.
ownerPasswordjava.lang.StringThe owner password allowing to open protected documents.
encryptionAlgorithmintThe 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:

ParameterTypeDescription
valueintthe 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:

ParameterTypeDescription
valuejava.lang.Stringthe Owner password.

setPermissions(int value)

public final void setPermissions(int value)

Sets the permissions.

Parameters:

ParameterTypeDescription
valueintthe 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:

ParameterTypeDescription
valuejava.lang.Stringthe User password.