Class StandaloneMacIntegrityProtector
java.lang.Object
com.itextpdf.kernel.mac.AbstractMacIntegrityProtector
com.itextpdf.kernel.mac.StandaloneMacIntegrityProtector
Class responsible for integrity protection in encrypted documents, which uses MAC container in the standalone mode.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classprivate final class -
Field Summary
FieldsFields inherited from class AbstractMacIntegrityProtector
document, fileEncryptionKey, kdfSalt, macProperties -
Constructor Summary
ConstructorsConstructorDescriptionStandaloneMacIntegrityProtector(PdfDocument document, MacProperties macProperties) StandaloneMacIntegrityProtector(PdfDocument document, PdfDictionary authDictionary) -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]createDocumentDigestAndMacContainer(byte[] documentBytes, long[] byteRange) private voidprivate intprivate ByteArrayOutputStream(package private) voidMethods inherited from class AbstractMacIntegrityProtector
createMacContainer, digestBytes, digestBytes, generateRandomBytes, getKdfSalt, setFileEncryptionKey, setKdfSalt, validateMacToken
-
Field Details
-
macPdfObject
-
-
Constructor Details
-
StandaloneMacIntegrityProtector
StandaloneMacIntegrityProtector(PdfDocument document, MacProperties macProperties) -
StandaloneMacIntegrityProtector
StandaloneMacIntegrityProtector(PdfDocument document, PdfDictionary authDictionary)
-
-
Method Details
-
prepareDocument
void prepareDocument() -
embedMacContainerInTrailer
- Throws:
IOException
-
createDocumentDigestAndMacContainer
private byte[] createDocumentDigestAndMacContainer(byte[] documentBytes, long[] byteRange) throws IOException - Throws:
IOException
-
getContainerSizeEstimate
private int getContainerSizeEstimate() -
getDocumentByteArrayOutputStream
-