at.knowcenter.wag.egov.egiz.pdf
Class BinarySignatureHolder

java.lang.Object
  extended by at.knowcenter.wag.egov.egiz.pdf.BinarySignatureHolder
All Implemented Interfaces:
SignatureHolder, Serializable

public class BinarySignatureHolder
extends Object
implements Serializable, SignatureHolder

Data structure that holds the information of one binary signature block, which is the signed/signable pdf and the corresponding SignatureObject.

The actual signed text is computed by Base64 encoding the binary data when first requested.

The corresponding getters can be used to retrieve the signed document (e.g. for displaying a preview).

Author:
wprinz
See Also:
Serialized Form

Constructor Summary
BinarySignatureHolder(byte[] pdf, int length, SignatureObject so)
          Constructor that takes the pdf and the SignatureObject as parameters.
 
Method Summary
protected  void computeSignedText()
          Computes or recomputes the signed text from the underlying binary data.
 SignatureObject getSignatureObject()
           
 byte[] getSignedPdf()
          Returns the signed_pdf.
 int getSignedPdfLength()
          Returns the signed_pdf_length.
 String getSignedText()
          Returns the signed text (verification) or the to-be-signed signable text (signation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinarySignatureHolder

public BinarySignatureHolder(byte[] pdf,
                             int length,
                             SignatureObject so)
Constructor that takes the pdf and the SignatureObject as parameters.

Parameters:
pdf - The pdf data.
length - The length (number of bytes) of the pdf data to be used for being converted into "signed text".
so - The signed signature object.
Method Detail

getSignedText

public String getSignedText()
Description copied from interface: SignatureHolder
Returns the signed text (verification) or the to-be-signed signable text (signation).

Note that this text must be the one that was actually signed. This text is directly passed to the connector for signation/verification. No normalization or modification will be / must be done to this text between reading out from the signature holder and passing the text to the connector.

Specified by:
getSignedText in interface SignatureHolder
Returns:
Returns the signed text or the to-be-signed signable text.
See Also:
SignatureHolder.getSignedText()

getSignatureObject

public SignatureObject getSignatureObject()
Specified by:
getSignatureObject in interface SignatureHolder
Returns:
Returns the SignatureObject containing the issuer, serial number, etc.
See Also:
SignatureHolder.getSignatureObject()

computeSignedText

protected void computeSignedText()
Computes or recomputes the signed text from the underlying binary data.

This usually encodes the binary data of given length in Base64.

This is usually called automatically when the signed text is first requested.


getSignedPdf

public byte[] getSignedPdf()
Returns the signed_pdf.

Returns:
Returns the signed_pdf.

getSignedPdfLength

public int getSignedPdfLength()
Returns the signed_pdf_length.

Returns:
Returns the signed_pdf_length.


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