Package com.itextpdf.kernel.mac
Class StandaloneMacContainerLocator
java.lang.Object
com.itextpdf.kernel.mac.StandaloneMacContainerLocator
- All Implemented Interfaces:
-
IMacContainerLocator
Default
AbstractMacIntegrityProtector
location strategy, which locates MAC container in document's trailer.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateMacIntegrityProtector
(PdfDocument document, MacProperties macProperties) CreatesAbstractMacIntegrityProtector
from explicitly provided MAC properties.createMacIntegrityProtector
(PdfDocument document, PdfDictionary authDictionary) CreatesAbstractMacIntegrityProtector
from already existing AuthCode dictionary.void
handleMacValidationError
(MacValidationException exception) Handles MAC validation error.boolean
Indicates, if MAC container was already located.void
locateMacContainer
(AbstractMacIntegrityProtector macIntegrityProtector) LocatesAbstractMacIntegrityProtector
container.
-
Constructor Details
-
StandaloneMacContainerLocator
public StandaloneMacContainerLocator()
-
-
Method Details
-
locateMacContainer
LocatesAbstractMacIntegrityProtector
container..- Specified by:
-
locateMacContainer
in interfaceIMacContainerLocator
- Parameters:
-
macIntegrityProtector
-AbstractMacIntegrityProtector
container to be located
-
isMacContainerLocated
public boolean isMacContainerLocated()Indicates, if MAC container was already located..- Specified by:
-
isMacContainerLocated
in interfaceIMacContainerLocator
- Returns:
-
true
if MAC container was already located,false
otherwise
-
createMacIntegrityProtector
public AbstractMacIntegrityProtector createMacIntegrityProtector(PdfDocument document, MacProperties macProperties) CreatesAbstractMacIntegrityProtector
from explicitly provided MAC properties..- Specified by:
-
createMacIntegrityProtector
in interfaceIMacContainerLocator
- Parameters:
-
document
-PdfDocument
for which MAC container shall be created -
macProperties
-MacProperties
to be used for MAC container creation - Returns:
-
AbstractMacIntegrityProtector
which specific implementation depends on interface implementation.
-
createMacIntegrityProtector
public AbstractMacIntegrityProtector createMacIntegrityProtector(PdfDocument document, PdfDictionary authDictionary) CreatesAbstractMacIntegrityProtector
from already existing AuthCode dictionary..- Specified by:
-
createMacIntegrityProtector
in interfaceIMacContainerLocator
- Parameters:
-
document
-PdfDocument
for which MAC container shall be created -
authDictionary
- AuthCodePdfDictionary
which contains MAC related information - Returns:
-
AbstractMacIntegrityProtector
which specific implementation depends on interface implementation.
-
handleMacValidationError
Handles MAC validation error.- Specified by:
-
handleMacValidationError
in interfaceIMacContainerLocator
- Parameters:
-
exception
-MacValidationException
to handle.
-