public interface PdfEncryptionSettings
| Modifier and Type | Method and Description |
|---|---|
void |
setEncryption(byte[] userPassword,
byte[] ownerPassword,
int permissions,
int encryptionType)
Sets the encryption options for this document.
|
void |
setEncryption(Certificate[] certs,
int[] permissions,
int encryptionType)
Sets the certificate encryption options for this document.
|
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 cleartextDocumentException - if the document is already openvoid setEncryption(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 openCopyright © 2019. All rights reserved.