public class StandardHandlerUsingAes256 extends StandardSecurityHandler
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
encryptMetadata |
permissions, 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 |
|---|
StandardHandlerUsingAes256(PdfDictionary encryptionDictionary,
byte[] password) |
StandardHandlerUsingAes256(PdfDictionary encryptionDictionary,
byte[] userPassword,
byte[] ownerPassword,
int permissions,
boolean encryptMetadata,
boolean embeddedFilesOnly,
PdfVersion version) |
| 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.
|
boolean |
isEncryptMetadata()
Checks whether the document-level metadata stream will be encrypted.
|
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.
|
void |
setPermissions(int permissions,
PdfDictionary encryptionDictionary)
Updates encryption dictionary with the security permissions provided.
|
equalsArray, generateOwnerPasswordIfNullOrEmpty, getIsoBytes, getPermissions, isUsedOwnerPassword, setStandardHandlerDicEntriesgetMkey, getNextObjectKeypublic StandardHandlerUsingAes256(PdfDictionary encryptionDictionary, byte[] userPassword, byte[] ownerPassword, int permissions, boolean encryptMetadata, boolean embeddedFilesOnly, PdfVersion version)
public StandardHandlerUsingAes256(PdfDictionary encryptionDictionary, byte[] password)
public boolean isEncryptMetadata()
true if the document-level metadata stream shall be encrypted, false otherwisepublic void setHashKeyForNextObject(int objNumber,
int objGeneration)
SecurityHandlersetHashKeyForNextObject in class SecurityHandlerobjNumber - number of particular object for encryptionobjGeneration - generation of particular object for encryptionpublic OutputStreamEncryption getEncryptionStream(OutputStream os)
SecurityHandlergetEncryptionStream in class SecurityHandleros - OutputStream to be wrappedOutputStreamEncryption, responsible for encryption.public IDecryptor getDecryptor()
SecurityHandlergetDecryptor in class SecurityHandlerIDecryptorpublic void setPermissions(int permissions,
PdfDictionary encryptionDictionary)
setPermissions in class StandardSecurityHandlerpermissions - new permissions to setencryptionDictionary - encryption dictionary to updateprotected void initMd5MessageDigest()
initMd5MessageDigest in class SecurityHandlerCopyright © 1998–2025 Apryse Group NV. All rights reserved.