at.knowcenter.wag.egov.egiz.framework.signators
Class BinarySignator_1_0_0

java.lang.Object
  extended by at.knowcenter.wag.egov.egiz.framework.signators.BinarySignator_1_0_0
All Implemented Interfaces:
Signator

public class BinarySignator_1_0_0
extends Object
implements Signator

Signs the document binary.

In prepareSign, an Incremental Update is created that contains the Signature block and the egiz dictionary. For formatting the layout, variable values are filled with placeholders. After the layout has been fixed, all variable fields (all holes in the byte ranges) are replaced with 0. This document is then base64 encoded and signed.

In finishSign, the variable fields (values, /Cert) are replaced with the values according to the encoding.

Author:
wprinz

Field Summary
static PdfASID MY_ID
          The Pdf-AS ID of this Signator.
 
Constructor Summary
BinarySignator_1_0_0()
          Default constructor.
 
Method Summary
 SignResult finishSign(IncrementalUpdateInformation iui)
          This is called after the data has been signed by the connector.
 IncrementalUpdateInformation prepareSign(byte[] pdf, String signature_type, TablePos pos, boolean has_SIG_ID)
          This is called before the data is sent to the connector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MY_ID

public static final PdfASID MY_ID
The Pdf-AS ID of this Signator.

Constructor Detail

BinarySignator_1_0_0

public BinarySignator_1_0_0()
Default constructor.

Method Detail

prepareSign

public IncrementalUpdateInformation prepareSign(byte[] pdf,
                                                String signature_type,
                                                TablePos pos,
                                                boolean has_SIG_ID)
                                         throws PresentableException
Description copied from interface: Signator
This is called before the data is sent to the connector.

Specified by:
prepareSign in interface Signator
Parameters:
pdf - The PDF document to be signed.
signature_type - The type/profile of the signature to apply.
pos - The table position. If null, the position is read from the profile, if this is null too, the position is computed.
has_SIG_ID - Tells the algorithm, id a SIG_ID field will be required after signing. Algorithms with fixed formatted signature blocks need to know this.
Returns:
Returns the IncrementalUpdateInformation.
Throws:
PresentableException - Forwarded exception.
See Also:
Signator.prepareSign(byte[], String, TablePos, boolean)

finishSign

public SignResult finishSign(IncrementalUpdateInformation iui)
                      throws PresentableException
Description copied from interface: Signator
This is called after the data has been signed by the connector.

Replaces all the left out placeholders with their values retrieved from the signation process.

Specified by:
finishSign in interface Signator
Parameters:
iui - The IncrementalUpdateInformation.
Throws:
PDFDocumentException - Forwarded exception.
PresentableException
See Also:
Signator.finishSign(at.knowcenter.wag.egov.egiz.pdf.IncrementalUpdateInformation)


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.