Package org.bouncycastle.openpgp
Class PGPV3SignatureGenerator
java.lang.Object
org.bouncycastle.openpgp.PGPV3SignatureGenerator
Generator for old style PGP V3 Signatures.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPGPV3SignatureGenerator(PGPContentSignerBuilder contentSignerBuilder) Create a signature generator built on the passed in contentSignerBuilder. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidblockUpdate(byte[] block, int off, int len) generate()Return a V3 signature object containing the current signature state.generateOnePassVersion(boolean isNested) Return the one pass header associated with the current signature.protected voidgetAttriubtesHash(PGPUserAttributeSubpacketVector userAttributes) voidinit(int signatureType, PGPPrivateKey key) Initialise the generator for signing.voidupdate(byte b) voidupdate(byte[] b) voidupdate(byte[] b, int off, int len) protected voidupdateWithIdData(int header, byte[] idBytes) protected void
-
Field Details
-
lastb
protected byte lastb -
sigOut
-
sigType
protected int sigType
-
-
Constructor Details
-
PGPV3SignatureGenerator
Create a signature generator built on the passed in contentSignerBuilder.- Parameters:
contentSignerBuilder- builder to produce PGPContentSigner objects for generating signatures.
-
-
Method Details
-
init
Initialise the generator for signing.- Parameters:
signatureType-key-- Throws:
PGPException
-
generateOnePassVersion
Return the one pass header associated with the current signature.- Parameters:
isNested-- Returns:
- PGPOnePassSignature
- Throws:
PGPException
-
generate
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
- Throws:
PGPException
-
getAttriubtesHash
protected void getAttriubtesHash(PGPUserAttributeSubpacketVector userAttributes) throws PGPException - Throws:
PGPException
-