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
-
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
-
SignatureMacContainerLocator
public SignatureMacContainerLocator()
-
-
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.
-