Class SignatureMacContainerLocator
java.lang.Object
com.itextpdf.signatures.mac.SignatureMacContainerLocator
- All Implemented Interfaces:
IMacContainerLocator
IMacContainerLocator strategy, which should be used specifically in case of signature creation.
This strategy locates MAC container in signature unsigned attributes.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateMacIntegrityProtector(PdfDocument document, MacProperties macProperties) CreatesAbstractMacIntegrityProtectorfrom explicitly provided MAC properties.createMacIntegrityProtector(PdfDocument document, PdfDictionary authDictionary) CreatesAbstractMacIntegrityProtectorfrom already existing AuthCode dictionary.voidhandleMacValidationError(MacValidationException exception) Handles MAC validation error.booleanIndicates, if MAC container was already located.voidlocateMacContainer(AbstractMacIntegrityProtector macIntegrityProtector) LocatesAbstractMacIntegrityProtectorcontainer.
-
Field Details
-
macContainerLocated
private boolean macContainerLocated
-
-
Constructor Details
-
SignatureMacContainerLocator
public SignatureMacContainerLocator()
-
-
Method Details
-
locateMacContainer
LocatesAbstractMacIntegrityProtectorcontainer..- Specified by:
locateMacContainerin interfaceIMacContainerLocator- Parameters:
macIntegrityProtector-AbstractMacIntegrityProtectorcontainer to be located
-
isMacContainerLocated
public boolean isMacContainerLocated()Indicates, if MAC container was already located..- Specified by:
isMacContainerLocatedin interfaceIMacContainerLocator- Returns:
trueif MAC container was already located,falseotherwise
-
createMacIntegrityProtector
public AbstractMacIntegrityProtector createMacIntegrityProtector(PdfDocument document, MacProperties macProperties) CreatesAbstractMacIntegrityProtectorfrom explicitly provided MAC properties..- Specified by:
createMacIntegrityProtectorin interfaceIMacContainerLocator- Parameters:
document-PdfDocumentfor which MAC container shall be createdmacProperties-MacPropertiesto be used for MAC container creation- Returns:
AbstractMacIntegrityProtectorwhich specific implementation depends on interface implementation.
-
createMacIntegrityProtector
public AbstractMacIntegrityProtector createMacIntegrityProtector(PdfDocument document, PdfDictionary authDictionary) CreatesAbstractMacIntegrityProtectorfrom already existing AuthCode dictionary..- Specified by:
createMacIntegrityProtectorin interfaceIMacContainerLocator- Parameters:
document-PdfDocumentfor which MAC container shall be createdauthDictionary- AuthCodePdfDictionarywhich contains MAC related information- Returns:
AbstractMacIntegrityProtectorwhich specific implementation depends on interface implementation.
-
handleMacValidationError
Handles MAC validation error.- Specified by:
handleMacValidationErrorin interfaceIMacContainerLocator- Parameters:
exception-MacValidationExceptionto handle.
-