public class PGPV3SignatureGenerator
extends java.lang.Object
| Constructor and Description |
|---|
PGPV3SignatureGenerator(int keyAlgorithm,
int hashAlgorithm,
java.security.Provider provider)
Deprecated.
use constructor taking PGPContentSignerBuilder.
|
PGPV3SignatureGenerator(int keyAlgorithm,
int hashAlgorithm,
java.lang.String provider)
Deprecated.
use constructor taking PGPContentSignerBuilder.
|
PGPV3SignatureGenerator(PGPContentSignerBuilder contentSignerBuilder)
Create a signature generator built on the passed in contentSignerBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
PGPSignature |
generate()
Return a V3 signature object containing the current signature state.
|
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()
|
void |
initSign(int signatureType,
PGPPrivateKey key,
java.security.SecureRandom random)
Deprecated.
random now ignored - set random in PGPContentSignerBuilder
|
void |
update(byte b) |
void |
update(byte[] b) |
void |
update(byte[] b,
int off,
int len) |
public PGPV3SignatureGenerator(int keyAlgorithm,
int hashAlgorithm,
java.lang.String provider)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException,
PGPException
keyAlgorithm - hashAlgorithm - provider - java.security.NoSuchAlgorithmExceptionjava.security.NoSuchProviderExceptionPGPExceptionpublic PGPV3SignatureGenerator(int keyAlgorithm,
int hashAlgorithm,
java.security.Provider provider)
throws java.security.NoSuchAlgorithmException,
PGPException
keyAlgorithm - hashAlgorithm - provider - java.security.NoSuchAlgorithmExceptionPGPExceptionpublic PGPV3SignatureGenerator(PGPContentSignerBuilder contentSignerBuilder)
contentSignerBuilder - builder to produce PGPContentSigner objects for generating signatures.public 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 initSign(int signatureType,
PGPPrivateKey key)
throws PGPException
signatureType - key - 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 PGPOnePassSignature generateOnePassVersion(boolean isNested) throws PGPException
isNested - PGPExceptionpublic PGPSignature generate() throws PGPException, java.security.SignatureException
PGPExceptionjava.security.SignatureException