Package com.itextpdf.kernel.mac
Class StandaloneMacIntegrityProtector
- java.lang.Object
-
- com.itextpdf.kernel.mac.AbstractMacIntegrityProtector
-
- com.itextpdf.kernel.mac.StandaloneMacIntegrityProtector
-
class StandaloneMacIntegrityProtector extends AbstractMacIntegrityProtector
Class responsible for integrity protection in encrypted documents, which uses MAC container in the standalone mode.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
StandaloneMacIntegrityProtector.StandaloneMacContainerEmbedder
private class
StandaloneMacIntegrityProtector.StandaloneMacPdfObjectAdder
-
Field Summary
Fields Modifier and Type Field Description private MacPdfObject
macPdfObject
-
Fields inherited from class com.itextpdf.kernel.mac.AbstractMacIntegrityProtector
document, fileEncryptionKey, kdfSalt, macProperties
-
-
Constructor Summary
Constructors Constructor Description StandaloneMacIntegrityProtector(PdfDocument document, MacProperties macProperties)
StandaloneMacIntegrityProtector(PdfDocument document, PdfDictionary authDictionary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private byte[]
createDocumentDigestAndMacContainer(byte[] documentBytes, long[] byteRange)
private void
embedMacContainerInTrailer()
private int
getContainerSizeEstimate()
private java.io.ByteArrayOutputStream
getDocumentByteArrayOutputStream()
(package private) void
prepareDocument()
-
Methods inherited from class com.itextpdf.kernel.mac.AbstractMacIntegrityProtector
createMacContainer, digestBytes, digestBytes, generateRandomBytes, getKdfSalt, setFileEncryptionKey, setKdfSalt, validateMacToken
-
-
-
-
Field Detail
-
macPdfObject
private MacPdfObject macPdfObject
-
-
Constructor Detail
-
StandaloneMacIntegrityProtector
StandaloneMacIntegrityProtector(PdfDocument document, MacProperties macProperties)
-
StandaloneMacIntegrityProtector
StandaloneMacIntegrityProtector(PdfDocument document, PdfDictionary authDictionary)
-
-
Method Detail
-
prepareDocument
void prepareDocument()
-
embedMacContainerInTrailer
private void embedMacContainerInTrailer() throws java.io.IOException
- Throws:
java.io.IOException
-
createDocumentDigestAndMacContainer
private byte[] createDocumentDigestAndMacContainer(byte[] documentBytes, long[] byteRange) throws java.io.IOException
- Throws:
java.io.IOException
-
getContainerSizeEstimate
private int getContainerSizeEstimate()
-
getDocumentByteArrayOutputStream
private java.io.ByteArrayOutputStream getDocumentByteArrayOutputStream()
-
-