public class PubSecHandlerUsingAesGcm extends PubSecHandlerUsingAes256
| Modifier and Type | Field and Description |
|---|---|
protected int |
inObjectNonceCounter |
protected byte[] |
noncePart |
extra, md5, mkey, nextObjectKey, nextObjectKeySize| Constructor and Description |
|---|
PubSecHandlerUsingAesGcm(PdfDictionary encryptionDictionary,
Certificate[] certs,
int[] permissions,
boolean encryptMetadata,
boolean embeddedFilesOnly)
Creates new
PubSecHandlerUsingAesGcm instance for encryption. |
PubSecHandlerUsingAesGcm(PdfDictionary encryptionDictionary,
Key certificateKey,
Certificate certificate,
String certificateKeyProvider,
IExternalDecryptionProcess externalDecryptionProcess,
boolean encryptMetadata)
Creates new
PubSecHandlerUsingAesGcm instance for decryption. |
| Modifier and Type | Method and Description |
|---|---|
IDecryptor |
getDecryptor()
Gets decryptor object.
|
OutputStreamEncryption |
getEncryptionStream(OutputStream os)
Gets a stream wrapper, responsible for encryption.
|
void |
setHashKeyForNextObject(int objNumber,
int objGeneration)
Note: For most of the supported security handlers algorithm to calculate encryption key for particular object
is the same.
|
protected void |
setPubSecSpecificHandlerDicEntries(PdfDictionary encryptionDictionary,
boolean encryptMetadata,
boolean embeddedFilesOnly) |
getDigestAlgorithm, initKeyaddAllRecipients, computeGlobalKey, computeGlobalKeyOnReading, createRecipientsArray, initKeyAndFillDictionary, initKeyAndReadDictionarygetMkey, getNextObjectKeyprotected byte[] noncePart
protected int inObjectNonceCounter
public PubSecHandlerUsingAesGcm(PdfDictionary encryptionDictionary, Certificate[] certs, int[] permissions, boolean encryptMetadata, boolean embeddedFilesOnly)
PubSecHandlerUsingAesGcm instance for encryption.encryptionDictionary - document's encryption dictionarycerts - recipients' X.509 public key certificatespermissions - access permissions provided to each recipientencryptMetadata - indicates whether the document-level metadata stream shall be encryptedembeddedFilesOnly - indicates whether embedded files shall be encrypted in an otherwise unencrypted documentpublic PubSecHandlerUsingAesGcm(PdfDictionary encryptionDictionary, Key certificateKey, Certificate certificate, String certificateKeyProvider, IExternalDecryptionProcess externalDecryptionProcess, boolean encryptMetadata)
PubSecHandlerUsingAesGcm instance for decryption.encryptionDictionary - document's encryption dictionarycertificateKey - the recipient private Key to the certificatecertificate - the recipient Certificate, serves as recipient identifiercertificateKeyProvider - the certificate key provider id
for Security.getProvider(String)externalDecryptionProcess - the external decryption process to be usedencryptMetadata - indicates whether the document-level metadata stream shall be encryptedpublic void setHashKeyForNextObject(int objNumber,
int objGeneration)
SecurityHandlersetHashKeyForNextObject in class PubSecHandlerUsingAes256objNumber - number of particular object for encryptionobjGeneration - generation of particular object for encryptionpublic OutputStreamEncryption getEncryptionStream(OutputStream os)
SecurityHandlergetEncryptionStream in class PubSecHandlerUsingAes128os - OutputStream to be wrappedOutputStreamEncryption, responsible for encryption.public IDecryptor getDecryptor()
SecurityHandlergetDecryptor in class PubSecHandlerUsingAes128IDecryptorprotected void setPubSecSpecificHandlerDicEntries(PdfDictionary encryptionDictionary, boolean encryptMetadata, boolean embeddedFilesOnly)
setPubSecSpecificHandlerDicEntries in class PubSecHandlerUsingAes256Copyright © 1998–2024 Apryse Group NV. All rights reserved.