Class PubSecHandlerUsingAes128
java.lang.Object
com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
com.itextpdf.kernel.crypto.securityhandler.PubKeySecurityHandler
com.itextpdf.kernel.crypto.securityhandler.PubSecHandlerUsingAes128
- Direct Known Subclasses:
-
PubSecHandlerUsingAes256
-
Field Summary
Fields inherited from class com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
extra, md5, mkey, nextObjectKey, nextObjectKeySize -
Constructor Summary
ConstructorsConstructorDescriptionPubSecHandlerUsingAes128(PdfDictionary encryptionDictionary, Certificate[] certs, int[] permissions, boolean encryptMetadata, boolean embeddedFilesOnly) PubSecHandlerUsingAes128(PdfDictionary encryptionDictionary, Key certificateKey, Certificate certificate, String certificateKeyProvider, IExternalDecryptionProcess externalDecryptionProcess, boolean encryptMetadata) -
Method Summary
Modifier and TypeMethodDescriptionGets decryptor object.protected StringGets a stream wrapper, responsible for encryption.protected voidinitKey(byte[] globalKey, int keyLength) voidsetHashKeyForNextObject(int objNumber, int objGeneration) Note: For most of the supported security handlers algorithm to calculate encryption key for particular object is the same.protected voidsetPubSecSpecificHandlerDicEntries(PdfDictionary encryptionDictionary, boolean encryptMetadata, boolean embeddedFilesOnly) Methods inherited from class com.itextpdf.kernel.crypto.securityhandler.PubKeySecurityHandler
addAllRecipients, computeGlobalKey, computeGlobalKeyOnReading, createRecipientsArray, initKeyAndFillDictionary, initKeyAndReadDictionaryMethods inherited from class com.itextpdf.kernel.crypto.securityhandler.SecurityHandler
getMkey, getNextObjectKey, initMd5MessageDigest
-
Constructor Details
-
PubSecHandlerUsingAes128
public PubSecHandlerUsingAes128(PdfDictionary encryptionDictionary, Certificate[] certs, int[] permissions, boolean encryptMetadata, boolean embeddedFilesOnly) -
PubSecHandlerUsingAes128
public PubSecHandlerUsingAes128(PdfDictionary encryptionDictionary, Key certificateKey, Certificate certificate, String certificateKeyProvider, IExternalDecryptionProcess externalDecryptionProcess, boolean encryptMetadata)
-
-
Method Details
-
getEncryptionStream
Description copied from class:SecurityHandlerGets a stream wrapper, responsible for encryption.- Specified by:
-
getEncryptionStreamin classSecurityHandler - Parameters:
-
os-OutputStreamto be wrapped - Returns:
-
OutputStreamEncryption, responsible for encryption.
-
getDecryptor
Description copied from class:SecurityHandlerGets decryptor object.- Specified by:
-
getDecryptorin classSecurityHandler - Returns:
-
IDecryptor
-
setHashKeyForNextObject
public void setHashKeyForNextObject(int objNumber, int objGeneration) Description copied from class:SecurityHandlerNote: For most of the supported security handlers algorithm to calculate encryption key for particular object is the same.- Overrides:
-
setHashKeyForNextObjectin classSecurityHandler - Parameters:
-
objNumber- number of particular object for encryption -
objGeneration- generation of particular object for encryption
-
getDigestAlgorithm
- Specified by:
-
getDigestAlgorithmin classPubKeySecurityHandler
-
initKey
protected void initKey(byte[] globalKey, int keyLength) - Specified by:
-
initKeyin classPubKeySecurityHandler
-
setPubSecSpecificHandlerDicEntries
protected void setPubSecSpecificHandlerDicEntries(PdfDictionary encryptionDictionary, boolean encryptMetadata, boolean embeddedFilesOnly) - Specified by:
-
setPubSecSpecificHandlerDicEntriesin classPubKeySecurityHandler
-