Package com.itextpdf.signatures.mac
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.
-
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.
-
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 created -
macProperties-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 created -
authDictionary- 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.
-