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 classStandaloneMacIntegrityProtector.StandaloneMacContainerEmbedderprivate classStandaloneMacIntegrityProtector.StandaloneMacPdfObjectAdder
-
Field Summary
Fields Modifier and Type Field Description private MacPdfObjectmacPdfObject-
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 voidembedMacContainerInTrailer()private intgetContainerSizeEstimate()private java.io.ByteArrayOutputStreamgetDocumentByteArrayOutputStream()(package private) voidprepareDocument()-
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()
-
-