Class StandaloneMacIntegrityProtector


  • class StandaloneMacIntegrityProtector
    extends AbstractMacIntegrityProtector
    Class responsible for integrity protection in encrypted documents, which uses MAC container in the standalone mode.
    • 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()