Package com.itextpdf.signatures.mac
Class SignatureMacContainerLocator
- java.lang.Object
-
- com.itextpdf.signatures.mac.SignatureMacContainerLocator
-
- All Implemented Interfaces:
IMacContainerLocator
public class SignatureMacContainerLocator extends java.lang.Object implements IMacContainerLocator
IMacContainerLocatorstrategy, which should be used specifically in case of signature creation. This strategy locates MAC container in signature unsigned attributes.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanmacContainerLocated
-
Constructor Summary
Constructors Constructor Description SignatureMacContainerLocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractMacIntegrityProtectorcreateMacIntegrityProtector(PdfDocument document, MacProperties macProperties)CreatesAbstractMacIntegrityProtectorfrom explicitly provided MAC properties.AbstractMacIntegrityProtectorcreateMacIntegrityProtector(PdfDocument document, PdfDictionary authDictionary)CreatesAbstractMacIntegrityProtectorfrom already existing AuthCode dictionary.voidhandleMacValidationError(MacValidationException exception)Handles MAC validation error.booleanisMacContainerLocated()Indicates, if MAC container was already located.voidlocateMacContainer(AbstractMacIntegrityProtector macIntegrityProtector)LocatesAbstractMacIntegrityProtectorcontainer.
-
-
-
Method Detail
-
locateMacContainer
public void locateMacContainer(AbstractMacIntegrityProtector macIntegrityProtector)
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
public void handleMacValidationError(MacValidationException exception)
Handles MAC validation error.- Specified by:
handleMacValidationErrorin interfaceIMacContainerLocator- Parameters:
exception-MacValidationExceptionto handle.
-
-