public class StandardHandlerUsingStandard40 extends StandardSecurityHandler
Modifier and Type | Field and Description |
---|---|
protected ARCFOUREncryption |
arcfour |
protected byte[] |
documentId |
protected int |
keyLength |
protected static byte[] |
metadataPad |
protected static byte[] |
pad |
permissions, PERMS_MASK_1_FOR_REVISION_2, PERMS_MASK_1_FOR_REVISION_3_OR_GREATER, PERMS_MASK_2, usedOwnerPassword
extra, md5, mkey, nextObjectKey, nextObjectKeySize
Constructor and Description |
---|
StandardHandlerUsingStandard40(PdfDictionary encryptionDictionary, byte[] password, byte[] documentId, boolean encryptMetadata) |
StandardHandlerUsingStandard40(PdfDictionary encryptionDictionary, byte[] userPassword, byte[] ownerPassword, int permissions, boolean encryptMetadata, boolean embeddedFilesOnly, byte[] documentId) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculatePermissions(int permissions) |
protected void |
computeGlobalEncryptionKey(byte[] userPad, byte[] ownerKey, boolean encryptMetadata) |
protected byte[] |
computeOwnerKey(byte[] userPad, byte[] ownerPad) |
protected byte[] |
computeUserKey() |
byte[] |
computeUserPassword(byte[] ownerPassword, PdfDictionary encryptionDictionary) |
IDecryptor |
getDecryptor() |
OutputStreamEncryption |
getEncryptionStream(OutputStream os) |
protected boolean |
isValidPassword(byte[] uValue, byte[] userKey) |
protected void |
setSpecificHandlerDicEntries(PdfDictionary encryptionDictionary, boolean encryptMetadata, boolean embeddedFilesOnly) |
equalsArray, generateOwnerPasswordIfNullOrEmpty, getIsoBytes, getPermissions, isUsedOwnerPassword, setStandardHandlerDicEntries
setHashKeyForNextObject
protected static final byte[] pad
protected static final byte[] metadataPad
protected byte[] documentId
protected int keyLength
protected ARCFOUREncryption arcfour
public StandardHandlerUsingStandard40(PdfDictionary encryptionDictionary, byte[] userPassword, byte[] ownerPassword, int permissions, boolean encryptMetadata, boolean embeddedFilesOnly, byte[] documentId)
public StandardHandlerUsingStandard40(PdfDictionary encryptionDictionary, byte[] password, byte[] documentId, boolean encryptMetadata)
public OutputStreamEncryption getEncryptionStream(OutputStream os)
getEncryptionStream
in class SecurityHandler
public IDecryptor getDecryptor()
getDecryptor
in class SecurityHandler
public byte[] computeUserPassword(byte[] ownerPassword, PdfDictionary encryptionDictionary)
protected void calculatePermissions(int permissions)
protected byte[] computeOwnerKey(byte[] userPad, byte[] ownerPad)
protected void computeGlobalEncryptionKey(byte[] userPad, byte[] ownerKey, boolean encryptMetadata)
protected byte[] computeUserKey()
protected void setSpecificHandlerDicEntries(PdfDictionary encryptionDictionary, boolean encryptMetadata, boolean embeddedFilesOnly)
protected boolean isValidPassword(byte[] uValue, byte[] userKey)
Copyright © 1998–2023 iText Group NV. All rights reserved.