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 empty
ownerPassword
- the owner password. Can be null or empty
permissions
- the user permissions
encryptionType
- 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 open
void setEncryption(Certificate[] certs, int[] permissions, int encryptionType) throws DocumentException
certs
- the public certificates to be used for the encryption
permissions
- the user permissions for each of the certificates
encryptionType
- 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
Copyright © 1998–2016. All rights reserved.