public class PGPSignatureGenerator
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected byte |
lastb |
protected java.io.OutputStream |
sigOut |
protected int |
sigType |
protected int |
version |
| Constructor and Description |
|---|
PGPSignatureGenerator(PGPContentSignerBuilder contentSignerBuilder)
Deprecated.
|
PGPSignatureGenerator(PGPContentSignerBuilder contentSignerBuilder,
PGPPublicKey signingKey)
Create a signature generator built on the passed in contentSignerBuilder.
|
PGPSignatureGenerator(PGPContentSignerBuilder contentSignerBuilder,
PGPPublicKey signingKey,
int signatureVersion) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
blockUpdate(byte[] block,
int off,
int len) |
PGPSignature |
generate()
Return a signature object containing the current signature state.
|
PGPSignature |
generateCertification(PGPPublicKey pubKey)
Generate a certification, such as a revocation, for the passed in key.
|
PGPSignature |
generateCertification(PGPPublicKey masterKey,
PGPPublicKey pubKey)
Generate a certification for the passed in key against the passed in
master key.
|
PGPSignature |
generateCertification(PGPUserAttributeSubpacketVector userAttributes,
PGPPublicKey pubKey)
Generate a certification for the passed in userAttributes
|
PGPSignature |
generateCertification(java.lang.String id,
PGPPublicKey pubKey)
Generate a certification for the passed in id and key.
|
PGPOnePassSignature |
generateOnePassVersion(boolean isNested)
Return the one pass header associated with the current signature.
|
protected void |
getAttributesHash(PGPUserAttributeSubpacketVector userAttributes) |
void |
init(int signatureType,
PGPPrivateKey key)
Initialise the generator for signing.
|
protected void |
prepareSignatureSubpackets() |
void |
setHashedSubpackets(PGPSignatureSubpacketVector hashedPcks)
Set the hashed signature subpackets.
|
void |
setUnhashedSubpackets(PGPSignatureSubpacketVector unhashedPcks)
Set the unhashed signature subpackets.
|
void |
update(byte b) |
void |
update(byte[] b) |
void |
update(byte[] b,
int off,
int len) |
protected void |
updateWithIdData(int header,
byte[] idBytes) |
protected void |
updateWithPublicKey(PGPPublicKey key) |
protected byte lastb
protected java.io.OutputStream sigOut
protected int sigType
protected final int version
public PGPSignatureGenerator(PGPContentSignerBuilder contentSignerBuilder)
PGPSignatureGenerator(PGPContentSignerBuilder, PGPPublicKey) instead.contentSignerBuilder - builder to produce PGPContentSigner objects for generating signatures.public PGPSignatureGenerator(PGPContentSignerBuilder contentSignerBuilder, PGPPublicKey signingKey)
contentSignerBuilder - builder to produce PGPContentSigner objects for generating signaturessigningKey - signing keypublic PGPSignatureGenerator(PGPContentSignerBuilder contentSignerBuilder, PGPPublicKey signingKey, int signatureVersion)
public void init(int signatureType,
PGPPrivateKey key)
throws PGPException
signatureType - type of signaturekey - private signing keyPGPExceptionpublic void setHashedSubpackets(PGPSignatureSubpacketVector hashedPcks)
hashedPcks - hashed signature subpacketspublic void setUnhashedSubpackets(PGPSignatureSubpacketVector unhashedPcks)
unhashedPcks - unhashed signature subpacketspublic PGPOnePassSignature generateOnePassVersion(boolean isNested) throws PGPException
isNested - true if the signature is nested, false otherwise.PGPExceptionpublic PGPSignature generate() throws PGPException
PGPExceptionprotected void prepareSignatureSubpackets()
throws PGPException
PGPExceptionpublic PGPSignature generateCertification(java.lang.String id, PGPPublicKey pubKey) throws PGPException
id - the id we are certifying against the public key.pubKey - the key we are certifying against the id.PGPExceptionpublic PGPSignature generateCertification(PGPUserAttributeSubpacketVector userAttributes, PGPPublicKey pubKey) throws PGPException
userAttributes - the id we are certifying against the public key.pubKey - the key we are certifying against the id.PGPExceptionpublic PGPSignature generateCertification(PGPPublicKey masterKey, PGPPublicKey pubKey) throws PGPException
masterKey - the key we are certifying against.pubKey - the key we are certifying.PGPExceptionpublic PGPSignature generateCertification(PGPPublicKey pubKey) throws PGPException
pubKey - the key we are certifying.PGPExceptionpublic void update(byte b)
public void update(byte[] b)
public void update(byte[] b,
int off,
int len)
protected void blockUpdate(byte[] block,
int off,
int len)
protected void updateWithIdData(int header,
byte[] idBytes)
protected void updateWithPublicKey(PGPPublicKey key) throws PGPException
PGPExceptionprotected void getAttributesHash(PGPUserAttributeSubpacketVector userAttributes) throws PGPException
PGPException