Foxit PDF SDK
com.foxit.sdk.pdf.DRMEncryptData Class Reference

Public Member Functions

 DRMEncryptData ()
 Constructor.

 
 DRMEncryptData (boolean is_encrypt_metadata, String sub_filter, int cipher, int key_length, boolean is_owner, int user_permissions)
 Constructor, with parameters.
More...
 
 DRMEncryptData (DRMEncryptData other)
 Constructor, with another DRM encrypt data object.
More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
int getCipher ()
 Get cipher type. More...
 
boolean getIs_encrypt_metadata ()
 Get a boolean value to decide whether to encrypt metadata or not. More...
 
boolean getIs_owner ()
 Get a boolean value to decide whether current user is owner or not. More...
 
int getKey_length ()
 Get the key length, in bytes. More...
 
String getSub_filter ()
 Get the sub filter name that specifies the syntax of the encryption dictionary contents. More...
 
int getUser_permissions ()
 Get the user permissions. More...
 
void set (boolean is_encrypt_metadata, String sub_filter, int cipher, int key_length, boolean is_owner, int user_permissions)
 Set value.
More...
 
void setCipher (int value)
 Set cipher type. More...
 
void setIs_encrypt_metadata (boolean value)
 Set a boolean value to decide whether to encrypt metadata or not. More...
 
void setIs_owner (boolean value)
 Set a boolean value to decide whether current user is owner or not. More...
 
void setKey_length (int value)
 Set the key length, in bytes. More...
 
void setSub_filter (String value)
 Set the sub filter name that specifies the syntax of the encryption dictionary contents. More...
 
void setUser_permissions (int value)
 Set the user permissions. More...
 

Detailed Description

This class represents some data used for class DRMSecurityHandler .

Constructor & Destructor Documentation

◆ DRMEncryptData() [1/2]

com.foxit.sdk.pdf.DRMEncryptData.DRMEncryptData ( boolean  is_encrypt_metadata,
String  sub_filter,
int  cipher,
int  key_length,
boolean  is_owner,
int  user_permissions 
)

Constructor, with parameters.

Parameters
[in]is_encrypt_metadatatrue means to encrypt metadata, and false means not to encrypt metadata
[in]sub_filterThe sub filter name that specifies the syntax of the encryption dictionary contents.
[in]cipherCipher type. Please refer to values starting from com.foxit.sdk.pdf.SecurityHandler.e_CipherRC4 and this should be one of these values except com.foxit.sdk.pdf.SecurityHandler.e_CipherNone .
[in]key_lengthThe key length, in bytes.
For com.foxit.sdk.pdf.SecurityHandler.e_CipherRC4 cipher, this value should be between 5 and 16.
For com.foxit.sdk.pdf.SecurityHandler.e_CipherAES cipher, this value should be 16 or 32.
[in]is_ownertrue means current user is owner, and false means current user is not owner.
[in]user_permissionsThe user permissions. Please refer to values starting from com.foxit.sdk.pdf.PDFDoc.e_PermPrint and this can be one or combination of these values.

◆ DRMEncryptData() [2/2]

com.foxit.sdk.pdf.DRMEncryptData.DRMEncryptData ( DRMEncryptData  other)

Constructor, with another DRM encrypt data object.

Parameters
[in]otherAnother DRM encrypt data object.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.pdf.DRMEncryptData.delete ( )

Clean up related resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

◆ getCipher()

com.foxit.sdk.pdf.DRMEncryptData.getCipher ( )

Get cipher type.

Returns
Cipher type. Please refer to values starting from com.foxit.sdk.pdf.SecurityHandler.e_CipherRC4 and this should be one of these values except com.foxit.sdk.pdf.SecurityHandler.e_CipherNone .

◆ getIs_encrypt_metadata()

com.foxit.sdk.pdf.DRMEncryptData.getIs_encrypt_metadata ( )

Get a boolean value to decide whether to encrypt metadata or not.

Returns
A boolean value to decide whether to encrypt metadata or not. true means to encrypt metadata, and false means not to encrypt metadata.

◆ getIs_owner()

com.foxit.sdk.pdf.DRMEncryptData.getIs_owner ( )

Get a boolean value to decide whether current user is owner or not.

Returns
A boolean value to decide whether current user is owner or not. true means current user is owner, and false means current user is not owner.

◆ getKey_length()

com.foxit.sdk.pdf.DRMEncryptData.getKey_length ( )

Get the key length, in bytes.

Returns
The key length, in bytes.
For com.foxit.sdk.pdf.SecurityHandler.e_CipherRC4 cipher, this value should be between 5 and 16.
For com.foxit.sdk.pdf.SecurityHandler.e_CipherAES cipher, this value should be 16 or 32.

◆ getSub_filter()

com.foxit.sdk.pdf.DRMEncryptData.getSub_filter ( )

Get the sub filter name that specifies the syntax of the encryption dictionary contents.

Returns
The sub filter name that specifies the syntax of the encryption dictionary contents.

◆ getUser_permissions()

com.foxit.sdk.pdf.DRMEncryptData.getUser_permissions ( )

Get the user permissions.

Returns
The user permissions. Please refer to values starting from com.foxit.sdk.pdf.PDFDoc.e_PermPrint and this can be one or combination of these values.

◆ set()

void com.foxit.sdk.pdf.DRMEncryptData.set ( boolean  is_encrypt_metadata,
String  sub_filter,
int  cipher,
int  key_length,
boolean  is_owner,
int  user_permissions 
)

Set value.

Parameters
[in]is_encrypt_metadatatrue means to encrypt metadata, and false means not to encrypt metadata
[in]sub_filterThe sub filter name that specifies the syntax of the encryption dictionary contents.
[in]cipherCipher type. Please refer to values starting from com.foxit.sdk.pdf.SecurityHandler.e_CipherRC4 and this should be one of these values except com.foxit.sdk.pdf.SecurityHandler.e_CipherNone .
[in]key_lengthThe key length, in bytes.
For com.foxit.sdk.pdf.SecurityHandler.e_CipherRC4 cipher, this value should be between 5 and 16.
For com.foxit.sdk.pdf.SecurityHandler.e_CipherAES cipher, this value should be 16 or 32.
[in]is_ownertrue means current user is owner, and false means current user is not owner.
[in]user_permissionsThe user permissions. Please refer to values starting from com.foxit.sdk.pdf.PDFDoc.e_PermPrint and this can be one or combination of these values.
Returns
None.

◆ setCipher()

com.foxit.sdk.pdf.DRMEncryptData.setCipher ( int  value)

Set cipher type.

Parameters
[in]valueCipher type. Please refer to values starting from com.foxit.sdk.pdf.SecurityHandler.e_CipherRC4 and this should be one of these values except com.foxit.sdk.pdf.SecurityHandler.e_CipherNone .
Returns
None.

◆ setIs_encrypt_metadata()

com.foxit.sdk.pdf.DRMEncryptData.setIs_encrypt_metadata ( boolean  value)

Set a boolean value to decide whether to encrypt metadata or not.

Parameters
[in]valueA boolean value to decide whether to encrypt metadata or not. true means to encrypt metadata, and false means not to encrypt metadata.
Returns
None.

◆ setIs_owner()

com.foxit.sdk.pdf.DRMEncryptData.setIs_owner ( boolean  value)

Set a boolean value to decide whether current user is owner or not.

Parameters
[in]valueA boolean value to decide whether current user is owner or not. true means current user is owner, and false means current user is not owner.
Returns
None.

◆ setKey_length()

com.foxit.sdk.pdf.DRMEncryptData.setKey_length ( int  value)

Set the key length, in bytes.

Parameters
[in]valueThe key length, in bytes.
For com.foxit.sdk.pdf.SecurityHandler.e_CipherRC4 cipher, this value should be between 5 and 16.
For com.foxit.sdk.pdf.SecurityHandler.e_CipherAES cipher, this value should be 16 or 32.
Returns
None.

◆ setSub_filter()

com.foxit.sdk.pdf.DRMEncryptData.setSub_filter ( String  value)

Set the sub filter name that specifies the syntax of the encryption dictionary contents.

Parameters
[in]valueThe sub filter name that specifies the syntax of the encryption dictionary contents.
Returns
None.

◆ setUser_permissions()

com.foxit.sdk.pdf.DRMEncryptData.setUser_permissions ( int  value)

Set the user permissions.

Parameters
[in]valueThe user permissions. Please refer to values starting from com.foxit.sdk.pdf.PDFDoc.e_PermPrint and this can be one or combination of these values.
Returns
None.