Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.lowagie.text.pdf
Class PdfSigGenericPKCS

    java.lang.Object
      com.lowagie.text.pdf.PdfObject
          com.lowagie.text.pdf.PdfDictionary
              com.lowagie.text.pdf.PdfSignature
                  com.lowagie.text.pdf.PdfSigGenericPKCS

Direct Known Subclasses:
  PdfSigGenericPKCS.PPKLite, PdfSigGenericPKCS.PPKMS, PdfSigGenericPKCS.VeriSign

    public abstract class PdfSigGenericPKCS

extends PdfSignature

A signature dictionary representation for the standard filters.

Nested Class Summary
`static class` | `PdfSigGenericPKCS.PPKLite` Creates a standard filter of the type self signed.
`static class` | `PdfSigGenericPKCS.PPKMS` Creates a standard filter of the type Windows Certificate.
`static class` | `PdfSigGenericPKCS.VeriSign` Creates a standard filter of the type VeriSign.

Field Summary
`private String` | `digestEncryptionAlgorithm`
`private byte[]` | `externalDigest`
`private byte[]` | `externalRSAdata`
`protected String` | `hashAlgorithm` The hash algorith, for example "SHA1"
`protected String` | `name` The subject name in the signing certificate (the element "CN")
`protected PdfPKCS7` | `pkcs` The class instance that calculates the PKCS#1 and PKCS#7
`protected String` | `provider` The crypto provider

Fields inherited from class com.lowagie.text.pdf.PdfDictionary
`CATALOG, FONT, hashMap, OUTLINES, PAGE, PAGES`

Fields inherited from class com.lowagie.text.pdf.PdfObject
`ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, indRef, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type`

Constructor Summary
`PdfSigGenericPKCS(PdfName filter, PdfName subFilter)` Creates a generic standard filter.

Method Summary
`String` | `getName()` Gets the subject name in the signing certificate (the element "CN")
`PdfPKCS7` | `getSigner()` Gets the class instance that does the actual signing.
`byte[]` | `getSignerContents()` Gets the signature content.
`void` | `setExternalDigest(byte[] digest, byte[] RSAdata, String digestEncryptionAlgorithm)` Sets the digest/signature to an external calculated value.
`void` | `setSignInfo(PrivateKey privKey, Certificate[] certChain, CRL[] crlList)` Sets the crypto information to sign.

Methods inherited from class com.lowagie.text.pdf.PdfSignature
`setByteRange, setCert, setContact, setContents, setDate, setLocation, setName, setReason`

Methods inherited from class com.lowagie.text.pdf.PdfDictionary
`contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toPdf, toString`

Methods inherited from class com.lowagie.text.pdf.PdfObject
`canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### hashAlgorithm

    protected String hashAlgorithm

  The hash algorith, for example "SHA1"

### provider

    protected String provider

  The crypto provider

### pkcs

    protected PdfPKCS7 pkcs

  The class instance that calculates the PKCS#1 and PKCS#7

### name

    protected String name

  The subject name in the signing certificate (the element "CN")

### externalDigest

    private byte[] externalDigest

### externalRSAdata

    private byte[] externalRSAdata

### digestEncryptionAlgorithm

    private String digestEncryptionAlgorithm

Constructor Detail

### PdfSigGenericPKCS

    public PdfSigGenericPKCS(PdfName filter,
                             PdfName subFilter)

  Creates a generic standard filter.

  Parameters:
    `filter` - the filter name
    `subFilter` - the sub-filter name

Method Detail

### setSignInfo

    public void setSignInfo(PrivateKey privKey,
                            Certificate[] certChain,
                            CRL[] crlList)

  Sets the crypto information to sign.

  Parameters:
    `privKey` - the private key
    `certChain` - the certificate chain
    `crlList` - the certificate revocation list. It can be `null`

### setExternalDigest

    public void setExternalDigest(byte[] digest,
                                  byte[] RSAdata,
                                  String digestEncryptionAlgorithm)

  Sets the digest/signature to an external calculated value.

  Parameters:
    `digest` - the digest. This is the actual signature
    `RSAdata` - the extra data that goes into the data tag in PKCS#7
    `digestEncryptionAlgorithm` - the encryption algorithm. It may must be `null` if the `digest` is also `null`. If the `digest` is not `null` then it may be "RSA" or "DSA"

### getName

    public String getName()

  Gets the subject name in the signing certificate (the element "CN")

  Returns:
    the subject name in the signing certificate (the element "CN")

### getSigner

    public PdfPKCS7 getSigner()

  Gets the class instance that does the actual signing.

  Returns:
    the class instance that does the actual signing

### getSignerContents

    public byte[] getSignerContents()

  Gets the signature content. This can be a PKCS#1 or a PKCS#7. It corresponds to the /Contents key.

  Returns:
    the signature content

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD