Top Description Fields Constructors Methods
org.bouncycastle.openpgp

public Class PGPV3SignatureGenerator

extends Object
Class Inheritance
Imports
java.io.ByteArrayOutputStream, .IOException, .OutputStream, java.math.BigInteger, java.util.Date, org.bouncycastle.bcpg.MPInteger, .OnePassSignaturePacket, .PublicKeyAlgorithmTags, .SignaturePacket, org.bouncycastle.openpgp.operator.PGPContentSigner, .PGPContentSignerBuilder

Generator for old style PGP V3 Signatures.

Field Summary

Modifier and TypeField and Description
private PGPContentSigner
private PGPContentSignerBuilder
private byte
private int
private OutputStream
private int

Constructor Summary

AccessConstructor and Description
public
PGPV3SignatureGenerator(PGPContentSignerBuilder
builder to produce PGPContentSigner objects for generating signatures.
contentSignerBuilder
)

Create a signature generator built on the passed in contentSignerBuilder.

Method Summary

Modifier and TypeMethod and Description
private void
blockUpdate(byte[] block, int off, int len)

private void
byteUpdate(byte b)

public PGPSignature

Returns:

PGPSignature
generate
()

Return a V3 signature object containing the current signature state.

public PGPOnePassSignature

Returns:

PGPOnePassSignature
generateOnePassVersion
(boolean isNested)

Return the one pass header associated with the current signature.

public void
init(int signatureType, PGPPrivateKey key)

Initialise the generator for signing.

public void
update(byte b)

public void
update(byte[] b)

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentSignerback to summary
private PGPContentSigner contentSigner
contentSignerBuilderback to summary
private PGPContentSignerBuilder contentSignerBuilder
lastbback to summary
private byte lastb
providedKeyAlgorithmback to summary
private int providedKeyAlgorithm
sigOutback to summary
private OutputStream sigOut
sigTypeback to summary
private int sigType

Constructor Detail

PGPV3SignatureGeneratorback to summary
public PGPV3SignatureGenerator(PGPContentSignerBuilder contentSignerBuilder)

Create a signature generator built on the passed in contentSignerBuilder.

Parameters
contentSignerBuilder:PGPContentSignerBuilder

builder to produce PGPContentSigner objects for generating signatures.

Method Detail

blockUpdateback to summary
private void blockUpdate(byte[] block, int off, int len)
byteUpdateback to summary
private void byteUpdate(byte b)
generateback to summary
public PGPSignature generate() throws PGPException

Return a V3 signature object containing the current signature state.

Returns:PGPSignature

PGPSignature

generateOnePassVersionback to summary
public PGPOnePassSignature generateOnePassVersion(boolean isNested) throws PGPException

Return the one pass header associated with the current signature.

Returns:PGPOnePassSignature

PGPOnePassSignature

initback to summary
public void init(int signatureType, PGPPrivateKey key) throws PGPException

Initialise the generator for signing.

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