com.spire.pdf.security
Class PdfSecurity

java.lang.Object
  extended by com.spire.pdf.security.PdfSecurity

Deprecated. The class will be removed in future. please use methods(PdfDocument.encrypt(PdfSecurityPolicy SecurityPolicy), PdfDocument.decrypt(), PdfDocument.getSecurityPolicy()) instead.

@Deprecated
public class PdfSecurity
extends java.lang.Object

Represents the security settings of the PDF document.


Constructor Summary
PdfSecurity()
          Deprecated. Initializes a new instance of the class.
PdfSecurity(PdfDictionary trailer)
          Deprecated. Initializes a new instance of the class.
 
Method Summary
 void decryptOwnerPassWord(java.lang.String ownerPassword)
          Deprecated. 
 void decryptUserPassWord()
          Deprecated. 
 void decryptUserPassWord(java.lang.String ownerPassword)
          Deprecated. 
 void encrypt(java.lang.String openPassword)
          Deprecated. 
 void encrypt(java.lang.String permissionPassword, PdfPermissionsFlags permissions)
          Deprecated. 
 void encrypt(java.lang.String openPassword, java.lang.String permissionPassword, java.util.EnumSet<PdfPermissionsFlags> permissions, PdfEncryptionKeySize keySize)
          Deprecated. 
 void encrypt(java.lang.String openPassword, java.lang.String permissionPassword, java.util.EnumSet<PdfPermissionsFlags> permissions, PdfEncryptionKeySize keySize, java.lang.String originalPermissionPassword)
          Deprecated. 
 void encrypt(java.lang.String openPassword, java.lang.String permissionPassword, PdfPermissionsFlags permissions, PdfEncryptionKeySize keySize)
          Deprecated. 
 void encrypt(java.lang.String openPassword, java.lang.String permissionPassword, PdfPermissionsFlags permissions, PdfEncryptionKeySize keySize, java.lang.String originalPermissionPassword)
          Deprecated. 
 PdfEncryptionKeySize getKeySize()
          Deprecated. 
 boolean getOriginalEncrypt()
          Deprecated. 
 java.lang.String getOwnerPassword()
          Deprecated. 
 java.util.EnumSet<PdfPermissionsFlags> getPermissions()
          Deprecated. 
 java.lang.String getUserPassword()
          Deprecated. 
 void setPermissions(java.util.EnumSet<PdfPermissionsFlags> value)
          Deprecated. 
 

Constructor Detail

PdfSecurity

public PdfSecurity()
Deprecated. 
Initializes a new instance of the class.


PdfSecurity

public PdfSecurity(PdfDictionary trailer)
Deprecated. 
Initializes a new instance of the class.

Parameters:
trailer - The pdf file trailer.
Method Detail

getOwnerPassword

@Deprecated
public java.lang.String getOwnerPassword()
Deprecated. 

Gets or sets the owner password.


getUserPassword

@Deprecated
public java.lang.String getUserPassword()
Deprecated. 

Gets or sets the user password.


getOriginalEncrypt

@Deprecated
public boolean getOriginalEncrypt()
Deprecated. 

Indicate whether this pdf document was encrypted originally or not.

Returns:
The document was encrypted originally or not.

decryptUserPassWord

@Deprecated
public void decryptUserPassWord()
Deprecated. 

Decrypt user password.


decryptUserPassWord

@Deprecated
public void decryptUserPassWord(java.lang.String ownerPassword)
Deprecated. 

Decrypt user password.

Parameters:
ownerPassword - The ownerPassword

decryptOwnerPassWord

@Deprecated
public void decryptOwnerPassWord(java.lang.String ownerPassword)
Deprecated. 

Decrypt all password.

Parameters:
ownerPassword - The ownerPassword

encrypt

@Deprecated
public void encrypt(java.lang.String openPassword)
Deprecated. 

To Encrypt the PDF document with open password. Note:If set empty string value to open password, it indicates that the PDF document can be operated without providing corresponding password. Note: the document owner password should not be exist.

Parameters:
openPassword - The open password.

encrypt

@Deprecated
public void encrypt(java.lang.String permissionPassword,
                               PdfPermissionsFlags permissions)
Deprecated. 

To Encrypt the PDF document with permission password and permissions. Note:The Permission password can't be empty string.

Parameters:
permissionPassword - The permission password.
permissions - A set of flags specifying which operations are permitted when the document is opened with user access.

encrypt

@Deprecated
public void encrypt(java.lang.String openPassword,
                               java.lang.String permissionPassword,
                               PdfPermissionsFlags permissions,
                               PdfEncryptionKeySize keySize)
Deprecated. 

To Encrypt the PDF document and set the encryption key size and permissions. Note:If set empty string value to open password or permission password, it indicates that the PDF document can be operated without providing corresponding password.

Parameters:
openPassword - The open password.
permissionPassword - The permission password.
permissions - A set of flags specifying which operations are permitted when the document is opened with user access.
keySize - The bit length of the encryption key.

encrypt

@Deprecated
public void encrypt(java.lang.String openPassword,
                               java.lang.String permissionPassword,
                               java.util.EnumSet<PdfPermissionsFlags> permissions,
                               PdfEncryptionKeySize keySize)
Deprecated. 

To Encrypt the PDF document and set the encryption key size and permissions. Note:If set empty string value to open password or permission password, it indicates that the PDF document can be operated without providing corresponding password.

Parameters:
openPassword - The open password.
permissionPassword - The permission password.
permissions - A set of flags specifying which operations are permitted when the document is opened with user access.
keySize - The bit length of the encryption key.

encrypt

@Deprecated
public void encrypt(java.lang.String openPassword,
                               java.lang.String permissionPassword,
                               PdfPermissionsFlags permissions,
                               PdfEncryptionKeySize keySize,
                               java.lang.String originalPermissionPassword)
Deprecated. 

To Encrypt the PDF document with open password and permission password,and set the encryption key size and permissions. Note:If set empty string value to open password or permission password, it indicates that the PDF document can be operated without providing corresponding password.

Parameters:
openPassword - The open password.
permissionPassword - The permission password.
permissions - A set of flags specifying which operations are permitted when the document is opened with user access.
keySize - The bit length of the encryption key<
originalPermissionPassword - The original permissionPassword of the document.

encrypt

@Deprecated
public void encrypt(java.lang.String openPassword,
                               java.lang.String permissionPassword,
                               java.util.EnumSet<PdfPermissionsFlags> permissions,
                               PdfEncryptionKeySize keySize,
                               java.lang.String originalPermissionPassword)
Deprecated. 

To Encrypt the PDF document with open password and permission password,and set the encryption key size and permissions. Note:If set empty string value to open password or permission password, it indicates that the PDF document can be operated without providing corresponding password.

Parameters:
openPassword - The open password.
permissionPassword - The permission password.
permissions - A set of flags specifying which operations are permitted when the document is opened with user access.
keySize - The bit length of the encryption key.
originalPermissionPassword - The original permissionPassword of the document.

getPermissions

@Deprecated
public java.util.EnumSet<PdfPermissionsFlags> getPermissions()
Deprecated. 

Permissions when the document is opened with user password.


setPermissions

@Deprecated
public void setPermissions(java.util.EnumSet<PdfPermissionsFlags> value)
Deprecated. 


getKeySize

@Deprecated
public PdfEncryptionKeySize getKeySize()
Deprecated. 

Gets or sets the size of the key.