Package com.itextpdf.kernel.mac
Class StandaloneMacContainerLocator
- java.lang.Object
-
- com.itextpdf.kernel.mac.StandaloneMacContainerLocator
-
- All Implemented Interfaces:
IMacContainerLocator
public class StandaloneMacContainerLocator extends java.lang.Object implements IMacContainerLocator
DefaultAbstractMacIntegrityProtector
location strategy, which locates MAC container in document's trailer.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
macContainerLocated
-
Constructor Summary
Constructors Constructor Description StandaloneMacContainerLocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractMacIntegrityProtector
createMacIntegrityProtector(PdfDocument document, MacProperties macProperties)
CreatesAbstractMacIntegrityProtector
from explicitly provided MAC properties.AbstractMacIntegrityProtector
createMacIntegrityProtector(PdfDocument document, PdfDictionary authDictionary)
CreatesAbstractMacIntegrityProtector
from already existing AuthCode dictionary.void
handleMacValidationError(MacValidationException exception)
Handles MAC validation error.boolean
isMacContainerLocated()
Indicates, if MAC container was already located.void
locateMacContainer(AbstractMacIntegrityProtector macIntegrityProtector)
LocatesAbstractMacIntegrityProtector
container.
-
-
-
Method Detail
-
locateMacContainer
public void locateMacContainer(AbstractMacIntegrityProtector macIntegrityProtector)
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 createdmacProperties
-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 createdauthDictionary
- AuthCodePdfDictionary
which contains MAC related information- Returns:
AbstractMacIntegrityProtector
which specific implementation depends on interface implementation.
-
handleMacValidationError
public void handleMacValidationError(MacValidationException exception)
Handles MAC validation error.- Specified by:
handleMacValidationError
in interfaceIMacContainerLocator
- Parameters:
exception
-MacValidationException
to handle.
-
-