at.gv.egiz.pdfas.impl.vfilter.helper
Class VerificationFilterBinaryHelper

java.lang.Object
  extended byat.gv.egiz.pdfas.impl.vfilter.helper.VerificationFilterBinaryHelper

public final class VerificationFilterBinaryHelper
extends Object

Contains helpful methods used by the VerificationFilter to analyze the PDF for binary signatures.

Author:
wprinz

Field Summary
static byte[] EGIZ_DICT_NAME
          The name of the egiz dict key.
static byte[] EGIZ_KZ_NAME
          The name of the ID (SIG_KZ) property in the egiz dict.
 
Constructor Summary
VerificationFilterBinaryHelper()
           
 
Method Summary
static boolean containsEGIZDict(byte[] pdf, FooterParseResult block)
          Tells, if the given incremental update block contains a binary signature.
static PdfASID extractKZFromEGIZBlock(byte[] pdf, FooterParseResult block)
          Extracts the PDF AS ID of the egiz block.
static String restoreKZ(byte[] pdf, ArrayParseResult kz_apr)
          Restores the Kennzeichnung String from an Array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EGIZ_DICT_NAME

public static final byte[] EGIZ_DICT_NAME
The name of the egiz dict key.


EGIZ_KZ_NAME

public static final byte[] EGIZ_KZ_NAME
The name of the ID (SIG_KZ) property in the egiz dict.

Constructor Detail

VerificationFilterBinaryHelper

public VerificationFilterBinaryHelper()
Method Detail

containsEGIZDict

public static boolean containsEGIZDict(byte[] pdf,
                                       FooterParseResult block)
Tells, if the given incremental update block contains a binary signature.

According to definition, if a block is a binary block, it must/cannot contain other signatures than this one.

Parameters:
block - The incremental update block.
Returns:
Returns true, if this block is a binary signature block, false otherwise.

extractKZFromEGIZBlock

public static PdfASID extractKZFromEGIZBlock(byte[] pdf,
                                             FooterParseResult block)
                                      throws PDFDocumentException,
                                             InvalidIDException
Extracts the PDF AS ID of the egiz block.

Parameters:
pdf - The pdf.
block - The IU block.
Returns:
Returns the extracted PDF AS ID.
Throws:
PDFDocumentException - Forwarded exception.
InvalidIDException - Forwarded exception.

restoreKZ

public static String restoreKZ(byte[] pdf,
                               ArrayParseResult kz_apr)
                        throws PDFDocumentException
Restores the Kennzeichnung String from an Array.

Parameters:
pdf - The PDF.
kz_apr - The Array, as parsed from the EGIZ Dict.
Returns:
Returns the restored KZ.
Throws:
PDFDocumentException - Forwarded exception.


Copyright © 2006-2010. All Rights Reserved.