com.lowagie.text.pdf
public class PdfEncryption extends Object
| Field Summary | |
|---|---|
| static int | AES_128 |
| ARCFOUREncryption | arcfour |
| int | cryptoMode |
| byte[] | documentID |
| boolean | embeddedFilesOnly
Indicates if the encryption is only necessary for embedded files. |
| boolean | encryptMetadata |
| byte[] | extra Work area to prepare the object/generation bytes |
| byte[] | key The encryption key for a particular object/generation |
| int | keyLength The generic key length. |
| int | keySize The encryption key length for a particular object/generation |
| MessageDigest | md5 The message digest algorithm MD5 |
| static byte[] | metadataPad |
| byte[] | mkey The global encryption key |
| byte[] | ownerKey The encryption key for the owner |
| static byte[] | pad |
| int | permissions |
| protected PdfPublicKeySecurityHandler | publicKeyHandler The public key security handler for certificate encryption |
| int | revision |
| static byte[] | salt |
| static long | seq |
| static int | STANDARD_ENCRYPTION_128 |
| static int | STANDARD_ENCRYPTION_40 |
| byte[] | userKey The encryption key for the user |
| Constructor Summary | |
|---|---|
| PdfEncryption() | |
| PdfEncryption(PdfEncryption enc) | |
| Method Summary | |
|---|---|
| void | addRecipient(Certificate cert, int permission) |
| int | calculateStreamSize(int n) |
| byte[] | computeOwnerKey(byte[] userPad, byte[] ownerPad) |
| byte[] | computeUserPassword(byte[] ownerPassword) |
| static byte[] | createDocumentId() |
| static PdfObject | createInfoId(byte[] id) |
| byte[] | decryptByteArray(byte[] b) |
| byte[] | encryptByteArray(byte[] b) |
| int | getCryptoMode() |
| StandardDecryption | getDecryptor() |
| PdfDictionary | getEncryptionDictionary() |
| OutputStreamEncryption | getEncryptionStream(OutputStream os) |
| PdfObject | getFileID() |
| boolean | isEmbeddedFilesOnly()
Indicates if only the embedded files have to be encrypted. |
| boolean | isMetadataEncrypted() |
| byte[] | padPassword(byte[] userPassword) |
| void | setCryptoMode(int mode, int kl) |
| void | setHashKey(int number, int generation) |
| void | setupAllKeys(byte[] userPassword, byte[] ownerPassword, int permissions) |
| void | setupByEncryptionKey(byte[] key, int keylength) |
| void | setupByOwnerPad(byte[] documentID, byte[] ownerPad, byte[] userKey, byte[] ownerKey, int permissions) |
| void | setupByOwnerPassword(byte[] documentID, byte[] ownerPassword, byte[] userKey, byte[] ownerKey, int permissions) |
| void | setupByUserPad(byte[] documentID, byte[] userPad, byte[] ownerKey, int permissions) |
| void | setupByUserPassword(byte[] documentID, byte[] userPassword, byte[] ownerKey, int permissions) |
| void | setupGlobalEncryptionKey(byte[] documentID, byte[] userPad, byte[] ownerKey, int permissions)
ownerKey, documentID must be setup |
| void | setupUserKey()
mkey must be setup |
Since: 2.1.3
Returns: if true only the embedded files will be encrypted
Since: 2.1.3