public class StandardHandlerUsingAesGcm extends StandardHandlerUsingAes256
| Modifier and Type | Field and Description |
|---|---|
protected int |
inObjectNonceCounter |
protected byte[] |
noncePart |
encryptMetadatapermissions, PERMS_MASK_1_FOR_REVISION_2, PERMS_MASK_1_FOR_REVISION_3_OR_GREATER, PERMS_MASK_2, usedOwnerPasswordextra, md5, mkey, nextObjectKey, nextObjectKeySize| Constructor and Description |
|---|
StandardHandlerUsingAesGcm(PdfDictionary encryptionDictionary,
byte[] password)
Creates new
StandardHandlerUsingAesGcm instance for decryption. |
StandardHandlerUsingAesGcm(PdfDictionary encryptionDictionary,
byte[] userPassword,
byte[] ownerPassword,
int permissions,
boolean encryptMetadata,
boolean embeddedFilesOnly)
Creates new
StandardHandlerUsingAesGcm instance for encryption. |
| Modifier and Type | Method and Description |
|---|---|
IDecryptor |
getDecryptor()
Gets decryptor object.
|
OutputStreamEncryption |
getEncryptionStream(OutputStream os)
Gets a stream wrapper, responsible for encryption.
|
protected void |
initMd5MessageDigest()
Init md5 message digest.
|
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.
|
isEncryptMetadata, setPermissionsequalsArray, generateOwnerPasswordIfNullOrEmpty, getIsoBytes, getPermissions, isUsedOwnerPassword, setStandardHandlerDicEntriesgetMkey, getNextObjectKeyprotected byte[] noncePart
protected int inObjectNonceCounter
public StandardHandlerUsingAesGcm(PdfDictionary encryptionDictionary, byte[] userPassword, byte[] ownerPassword, int permissions, boolean encryptMetadata, boolean embeddedFilesOnly)
StandardHandlerUsingAesGcm instance for encryption.encryptionDictionary - document's encryption dictionaryuserPassword - user passwordownerPassword - owner passwordpermissions - access permissionsencryptMetadata - indicates whether the document-level metadata stream shall be encryptedembeddedFilesOnly - indicates whether embedded files shall be encrypted in an otherwise unencrypted documentpublic StandardHandlerUsingAesGcm(PdfDictionary encryptionDictionary, byte[] password)
StandardHandlerUsingAesGcm instance for decryption.encryptionDictionary - document's encryption dictionarypassword - owner or user password to decrypt the documentpublic void setHashKeyForNextObject(int objNumber,
int objGeneration)
SecurityHandlersetHashKeyForNextObject in class StandardHandlerUsingAes256objNumber - number of particular object for encryptionobjGeneration - generation of particular object for encryptionpublic OutputStreamEncryption getEncryptionStream(OutputStream os)
SecurityHandlergetEncryptionStream in class StandardHandlerUsingAes256os - OutputStream to be wrappedOutputStreamEncryption, responsible for encryption.public IDecryptor getDecryptor()
SecurityHandlergetDecryptor in class StandardHandlerUsingAes256IDecryptorprotected void initMd5MessageDigest()
initMd5MessageDigest in class StandardHandlerUsingAes256Copyright © 1998–2025 Apryse Group NV. All rights reserved.