org.bouncycastle.openpgp

Class PGPV3SignatureGenerator

public class PGPV3SignatureGenerator extends Object

Generator for old style PGP V3 Signatures.
Constructor Summary
PGPV3SignatureGenerator(int keyAlgorithm, int hashAlgorithm, String provider)
Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
Method Summary
PGPSignaturegenerate()
Return a V3 signature object containing the current signature state.
PGPOnePassSignaturegenerateOnePassVersion(boolean isNested)
Return the one pass header associated with the current signature.
voidinitSign(int signatureType, PGPPrivateKey key)
Initialise the generator for signing.
voidupdate(byte b)
voidupdate(byte[] b)
voidupdate(byte[] b, int off, int len)

Constructor Detail

PGPV3SignatureGenerator

public PGPV3SignatureGenerator(int keyAlgorithm, int hashAlgorithm, String provider)
Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.

Parameters: keyAlgorithm hashAlgorithm provider

Throws: NoSuchAlgorithmException NoSuchProviderException PGPException

Method Detail

generate

public PGPSignature generate()
Return a V3 signature object containing the current signature state.

Returns: PGPSignature

Throws: PGPException SignatureException

generateOnePassVersion

public PGPOnePassSignature generateOnePassVersion(boolean isNested)
Return the one pass header associated with the current signature.

Parameters: isNested

Returns: PGPOnePassSignature

Throws: PGPException

initSign

public void initSign(int signatureType, PGPPrivateKey key)
Initialise the generator for signing.

Parameters: signatureType key

Throws: PGPException

update

public void update(byte b)

update

public void update(byte[] b)

update

public void update(byte[] b, int off, int len)