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

## org.bouncycastle.openpgp
Class PGPSignatureGenerator

    java.lang.Object
      |
      +--org.bouncycastle.openpgp.PGPSignatureGenerator

public class PGPSignatureGenerator
extends java.lang.Object

Generator for PGP Signatures.

Constructor Summary
`PGPSignatureGenerator(int keyAlgorithm, int hashAlgorithm, java.lang.String provider)` Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.

Method Summary
`PGPSignature` | `generate()` Return a signature object containing the current signature state.
`PGPOnePassSignature` | `generateOnePassVersion(boolean isNested)` Return the one pass header associated with the current signature.
`void` | `initSign(int signatureType, PGPPrivateKey key)` Initialise the generator for signing.
`void` | `setHashedSubpackets(PGPSignatureSubpacketVector hashedPcks)`
`void` | `setUnhashedSubpackets(PGPSignatureSubpacketVector unhashedPcks)`
`void` | `update(byte b)`
`void` | `update(byte[] b)`
`void` | `update(byte[] b, int off, int len)`

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

Constructor Detail

### PGPSignatureGenerator

    public PGPSignatureGenerator(int keyAlgorithm,
                                 int hashAlgorithm,
                                 java.lang.String provider)
                          throws java.security.NoSuchAlgorithmException,
                                 java.security.NoSuchProviderException,
                                 PGPException

  Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.

Parameters:
  `keyAlgorithm` -
  `hashAlgorithm` -
  `provider` -
Throws:
  `java.security.NoSuchAlgorithmException`
  `java.security.NoSuchProviderException`
  `PGPException`

Method Detail

### initSign

    public void initSign(int signatureType,
                         PGPPrivateKey key)
                  throws PGPException

  Initialise the generator for signing.

  Parameters:
    `signatureType` -
    `key` -
  Throws:
    `PGPException`

### update

    public void update(byte b)
                throws java.security.SignatureException

    `java.security.SignatureException`

### update

    public void update(byte[] b)
                throws java.security.SignatureException

    `java.security.SignatureException`

### update

    public void update(byte[] b,
                       int off,
                       int len)
                throws java.security.SignatureException

    `java.security.SignatureException`

### setHashedSubpackets

    public void setHashedSubpackets(PGPSignatureSubpacketVector hashedPcks)

### setUnhashedSubpackets

    public void setUnhashedSubpackets(PGPSignatureSubpacketVector unhashedPcks)

### generateOnePassVersion

    public PGPOnePassSignature generateOnePassVersion(boolean isNested)
                                               throws PGPException

  Return the one pass header associated with the current signature.

  Parameters:
    `isNested` -
  Returns:
    PGPOnePassSignature
  Throws:
    `PGPException`

### generate

    public PGPSignature generate()
                          throws PGPException,
                                 java.security.SignatureException

  Return a signature object containing the current signature state.

  Returns:
    PGPSignature
  Throws:
    `PGPException`
    `java.security.SignatureException`

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