public class PdfEncryption extends Object
Modifier and Type | Field and Description |
---|---|
static int |
AES_128 |
protected PdfPublicKeySecurityHandler |
publicKeyHandler
The public key security handler for certificate encryption
|
static int |
STANDARD_ENCRYPTION_128 |
static int |
STANDARD_ENCRYPTION_40 |
Constructor and Description |
---|
PdfEncryption() |
PdfEncryption(PdfEncryption enc) |
Modifier and Type | Method and Description |
---|---|
void |
addRecipient(Certificate cert,
int permission) |
int |
calculateStreamSize(int n) |
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() |
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 |
setupByOwnerPassword(byte[] documentID,
byte[] ownerPassword,
byte[] userKey,
byte[] ownerKey,
int permissions) |
void |
setupByUserPassword(byte[] documentID,
byte[] userPassword,
byte[] ownerKey,
int permissions) |
public static final int STANDARD_ENCRYPTION_40
public static final int STANDARD_ENCRYPTION_128
public static final int AES_128
protected PdfPublicKeySecurityHandler publicKeyHandler
public PdfEncryption()
public PdfEncryption(PdfEncryption enc)
public void setCryptoMode(int mode, int kl)
public int getCryptoMode()
public boolean isMetadataEncrypted()
public boolean isEmbeddedFilesOnly()
public void setupAllKeys(byte[] userPassword, byte[] ownerPassword, int permissions)
public static byte[] createDocumentId()
public void setupByUserPassword(byte[] documentID, byte[] userPassword, byte[] ownerKey, int permissions)
public void setupByOwnerPassword(byte[] documentID, byte[] ownerPassword, byte[] userKey, byte[] ownerKey, int permissions)
public void setupByEncryptionKey(byte[] key, int keylength)
public void setHashKey(int number, int generation)
public static PdfObject createInfoId(byte[] id)
public PdfDictionary getEncryptionDictionary()
public PdfObject getFileID()
public OutputStreamEncryption getEncryptionStream(OutputStream os)
public int calculateStreamSize(int n)
public byte[] encryptByteArray(byte[] b)
public StandardDecryption getDecryptor()
public byte[] decryptByteArray(byte[] b)
public void addRecipient(Certificate cert, int permission)
public byte[] computeUserPassword(byte[] ownerPassword)
Copyright © 2018. All rights reserved.