Interface IMacContainerLocator
- All Known Implementing Classes:
SignatureMacContainerLocator, StandaloneMacContainerLocator
public interface IMacContainerLocator
Strategy interface, which is responsible for
AbstractMacIntegrityProtector container location.
Expected to be used in DIContainer.-
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.
-
Method Details
-
locateMacContainer
LocatesAbstractMacIntegrityProtectorcontainer.- Parameters:
macIntegrityProtector-AbstractMacIntegrityProtectorcontainer to be located
-
isMacContainerLocated
boolean isMacContainerLocated()Indicates, if MAC container was already located.- Returns:
trueif MAC container was already located,falseotherwise
-
createMacIntegrityProtector
AbstractMacIntegrityProtector createMacIntegrityProtector(PdfDocument document, MacProperties macProperties) CreatesAbstractMacIntegrityProtectorfrom explicitly provided MAC properties.- 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
AbstractMacIntegrityProtector createMacIntegrityProtector(PdfDocument document, PdfDictionary authDictionary) CreatesAbstractMacIntegrityProtectorfrom already existing AuthCode dictionary.- 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.- Parameters:
exception-MacValidationExceptionto handle.
-