public class PGPSignatureGenerator
extends java.lang.Object
| Constructor and Description |
|---|
PGPSignatureGenerator(int keyAlgorithm,
int hashAlgorithm,
java.security.Provider provider)
Deprecated.
use method taking a PGPContentSignerBuilder
|
PGPSignatureGenerator(int keyAlgorithm,
int hashAlgorithm,
java.lang.String provider)
Deprecated.
use method taking a PGPContentSignerBuilder
|
PGPSignatureGenerator(int keyAlgorithm,
java.security.Provider sigProvider,
int hashAlgorithm,
java.security.Provider digProvider)
Deprecated.
use constructor taking PGPContentSignerBuilder.
|
PGPSignatureGenerator(int keyAlgorithm,
java.lang.String sigProvider,
int hashAlgorithm,
java.lang.String digProvider)
Deprecated.
use method taking a PGPContentSignerBuilder
|
PGPSignatureGenerator(PGPContentSignerBuilder contentSignerBuilder)
Create a signature generator built on the passed in contentSignerBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
init(int signatureType,
PGPPrivateKey key)
Initialise the generator for signing.
|
void |
initSign(int signatureType,
PGPPrivateKey key)
Deprecated.
use init() method
|
void |
initSign(int signatureType,
PGPPrivateKey key,
java.security.SecureRandom random)
Deprecated.
random parameter now ignored.
|
void |
setHashedSubpackets(PGPSignatureSubpacketVector hashedPcks) |
void |
setUnhashedSubpackets(PGPSignatureSubpacketVector unhashedPcks) |
void |
update(byte b) |
void |
update(byte[] b) |
void |
update(byte[] b,
int off,
int len) |
public PGPSignatureGenerator(int keyAlgorithm,
int hashAlgorithm,
java.lang.String provider)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException,
PGPException
keyAlgorithm - keyAlgorithm to use for signinghashAlgorithm - algorithm to use for digestprovider - provider to use for digest algorithmjava.security.NoSuchAlgorithmExceptionjava.security.NoSuchProviderExceptionPGPExceptionpublic PGPSignatureGenerator(int keyAlgorithm,
int hashAlgorithm,
java.security.Provider provider)
throws java.security.NoSuchAlgorithmException,
PGPException
java.security.NoSuchAlgorithmExceptionPGPExceptionpublic PGPSignatureGenerator(int keyAlgorithm,
java.lang.String sigProvider,
int hashAlgorithm,
java.lang.String digProvider)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException,
PGPException
keyAlgorithm - keyAlgorithm to use for signingsigProvider - provider to use for signature generationhashAlgorithm - algorithm to use for digestdigProvider - provider to use for digest algorithmjava.security.NoSuchAlgorithmExceptionjava.security.NoSuchProviderExceptionPGPExceptionpublic PGPSignatureGenerator(int keyAlgorithm,
java.security.Provider sigProvider,
int hashAlgorithm,
java.security.Provider digProvider)
throws java.security.NoSuchAlgorithmException,
PGPException
keyAlgorithm - sigProvider - hashAlgorithm - digProvider - java.security.NoSuchAlgorithmExceptionPGPExceptionpublic PGPSignatureGenerator(PGPContentSignerBuilder contentSignerBuilder)
contentSignerBuilder - builder to produce PGPContentSigner objects for generating signatures.public void initSign(int signatureType,
PGPPrivateKey key)
throws PGPException
signatureType - key - PGPExceptionpublic void init(int signatureType,
PGPPrivateKey key)
throws PGPException
signatureType - key - PGPExceptionpublic void initSign(int signatureType,
PGPPrivateKey key,
java.security.SecureRandom random)
throws PGPException
signatureType - key - random - PGPExceptionpublic void update(byte b)
throws java.security.SignatureException
java.security.SignatureExceptionpublic void update(byte[] b)
throws java.security.SignatureException
java.security.SignatureExceptionpublic void update(byte[] b,
int off,
int len)
throws java.security.SignatureException
java.security.SignatureExceptionpublic void setHashedSubpackets(PGPSignatureSubpacketVector hashedPcks)
public void setUnhashedSubpackets(PGPSignatureSubpacketVector unhashedPcks)
public PGPOnePassSignature generateOnePassVersion(boolean isNested) throws PGPException
isNested - PGPExceptionpublic PGPSignature generate() throws PGPException, java.security.SignatureException
PGPExceptionjava.security.SignatureExceptionpublic PGPSignature generateCertification(java.lang.String id, PGPPublicKey pubKey) throws java.security.SignatureException, PGPException
id - the id we are certifying against the public key.pubKey - the key we are certifying against the id.java.security.SignatureExceptionPGPExceptionpublic PGPSignature generateCertification(PGPUserAttributeSubpacketVector userAttributes, PGPPublicKey pubKey) throws java.security.SignatureException, PGPException
userAttributes - the id we are certifying against the public key.pubKey - the key we are certifying against the id.java.security.SignatureExceptionPGPExceptionpublic PGPSignature generateCertification(PGPPublicKey masterKey, PGPPublicKey pubKey) throws java.security.SignatureException, PGPException
masterKey - the key we are certifying against.pubKey - the key we are certifying.java.security.SignatureExceptionPGPExceptionpublic PGPSignature generateCertification(PGPPublicKey pubKey) throws java.security.SignatureException, PGPException
pubKey - the key we are certifying.java.security.SignatureExceptionPGPException