|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PdfEncryptionSettings
Encryption settings are described in section 3.5 (more specifically section 3.5.2) of the PDF Reference 1.7. They are explained in section 3.3.3 of the book 'iText in Action'. The values of the different preferences were originally stored in class PdfWriter, but they have been moved to this separate interface for reasons of convenience.
Method Summary | |
---|---|
void |
setEncryption(byte[] userPassword,
byte[] ownerPassword,
int permissions,
int encryptionType)
Sets the encryption options for this document. |
void |
setEncryption(java.security.cert.Certificate[] certs,
int[] permissions,
int encryptionType)
Sets the certificate encryption options for this document. |
Method Detail |
---|
void setEncryption(byte[] userPassword, byte[] ownerPassword, int permissions, int encryptionType) throws DocumentException
userPassword
- the user password. Can be null or emptyownerPassword
- the owner password. Can be null or emptypermissions
- the user permissionsencryptionType
- the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128.
Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartext
DocumentException
- if the document is already openvoid setEncryption(java.security.cert.Certificate[] certs, int[] permissions, int encryptionType) throws DocumentException
certs
- the public certificates to be used for the encryptionpermissions
- the user permissions for each of the certificatesencryptionType
- the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128.
DocumentException
- if the document is already open
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |