Package com.itextpdf.kernel.mac
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 class
private final class
-
Field Summary
FieldsFields inherited from class com.itextpdf.kernel.mac.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 void
private int
private ByteArrayOutputStream
(package private) void
Methods inherited from class com.itextpdf.kernel.mac.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
-