Package org.bouncycastle.openpgp
Class PGPV3SignatureGenerator
- java.lang.Object
-
- org.bouncycastle.openpgp.PGPV3SignatureGenerator
-
public class PGPV3SignatureGenerator extends java.lang.Object
Generator for old style PGP V3 Signatures.
-
-
Constructor Summary
Constructors Constructor Description PGPV3SignatureGenerator(PGPContentSignerBuilder contentSignerBuilder)
Create a signature generator built on the passed in contentSignerBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
blockUpdate(byte[] block, int off, int len)
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.protected void
getAttributesHash(PGPUserAttributeSubpacketVector userAttributes)
void
init(int signatureType, PGPPrivateKey key)
Initialise the generator for signing.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)
-
-
-
Constructor Detail
-
PGPV3SignatureGenerator
public PGPV3SignatureGenerator(PGPContentSignerBuilder contentSignerBuilder)
Create a signature generator built on the passed in contentSignerBuilder.- Parameters:
contentSignerBuilder
- builder to produce PGPContentSigner objects for generating signatures.
-
-
Method Detail
-
init
public void init(int signatureType, PGPPrivateKey key) throws PGPException
Initialise the generator for signing.- Parameters:
signatureType
-key
-- Throws:
PGPException
-
generateOnePassVersion
public PGPOnePassSignature generateOnePassVersion(boolean isNested) throws PGPException
Return the one pass header associated with the current signature.- Parameters:
isNested
-- Returns:
- PGPOnePassSignature
- Throws:
PGPException
-
generate
public PGPSignature generate() throws PGPException
Return a V3 signature object containing the current signature state.- Returns:
- PGPSignature
- Throws:
PGPException
-
update
public void update(byte b)
-
update
public void update(byte[] b)
-
update
public void update(byte[] b, int off, int len)
-
blockUpdate
protected void blockUpdate(byte[] block, int off, int len)
-
updateWithIdData
protected void updateWithIdData(int header, byte[] idBytes)
-
updateWithPublicKey
protected void updateWithPublicKey(PGPPublicKey key) throws PGPException
- Throws:
PGPException
-
getAttributesHash
protected void getAttributesHash(PGPUserAttributeSubpacketVector userAttributes) throws PGPException
- Throws:
PGPException
-
-