org.bouncycastle.openpgp
Class PGPSignatureGenerator
java.lang.Object
org.bouncycastle.openpgp.PGPSignatureGenerator
public class PGPSignatureGenerator
extends java.lang.Object
Generator for PGP Signatures.
PGPSignatureGenerator(int keyAlgorithm, String sigProvider, int hashAlgorithm, String provider) - Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
|
PGPSignatureGenerator(int keyAlgorithm, int hashAlgorithm, String provider) - Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
|
PGPSignatureGenerator
public PGPSignatureGenerator(int keyAlgorithm,
String sigProvider,
int hashAlgorithm,
String provider)
throws NoSuchAlgorithmException,
NoSuchProviderException,
PGPException
Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
keyAlgorithm
- keyAlgorithm to use for signingsigProvider
- provider to use for signature generationhashAlgorithm
- algorithm to use for digestprovider
- provider to use for digest algorithm
PGPSignatureGenerator
public PGPSignatureGenerator(int keyAlgorithm,
int hashAlgorithm,
String provider)
throws NoSuchAlgorithmException,
NoSuchProviderException,
PGPException
Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
keyAlgorithm
- keyAlgorithm to use for signinghashAlgorithm
- algorithm to use for digestprovider
- provider to use for digest algorithm
generate
public PGPSignature generate()
throws PGPException,
SignatureException
Return a signature object containing the current signature state.
generateCertification
public PGPSignature generateCertification(String id,
PGPPublicKey pubKey)
throws SignatureException,
PGPException
Generate a certification for the passed in id and key.
id
- the id we are certifying against the public key.pubKey
- the key we are certifying against the id.
generateCertification
public PGPSignature generateCertification(PGPPublicKey pubKey)
throws SignatureException,
PGPException
Generate a certification, such as a revocation, for the passed in key.
pubKey
- the key we are certifying.
generateCertification
public PGPSignature generateCertification(PGPPublicKey masterKey,
PGPPublicKey pubKey)
throws SignatureException,
PGPException
Generate a certification for the passed in key against the passed in
master key.
masterKey
- the key we are certifying against.pubKey
- the key we are certifying.
generateOnePassVersion
public PGPOnePassSignature generateOnePassVersion(boolean isNested)
throws PGPException
Return the one pass header associated with the current signature.
update
public void update(byte b)
throws SignatureException
update
public void update(byte[] b)
throws SignatureException
update
public void update(byte[] b,
int off,
int len)
throws SignatureException