Package org.bouncycastle.openpgp
Class PGPOnePassSignature
java.lang.Object
org.bouncycastle.openpgp.PGPOnePassSignature
A one pass signature object.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(OutputStream outStream) byte[]
int
int
long
getKeyID()
int
void
init
(PGPContentVerifierBuilderProvider verifierBuilderProvider, PGPPublicKey pubKey) Initialise the signature object for verification.void
update
(byte b) void
update
(byte[] bytes) void
update
(byte[] bytes, int off, int length) boolean
verify
(PGPSignature pgpSig) Verify the calculated signature against the passed in PGPSignature.
-
Method Details
-
init
public void init(PGPContentVerifierBuilderProvider verifierBuilderProvider, PGPPublicKey pubKey) throws PGPException Initialise the signature object for verification.- Parameters:
verifierBuilderProvider
- provider for a content verifier builder for the signature type of interest.pubKey
- the public key to use for verification- Throws:
PGPException
- if there's an issue with creating the verifier.
-
update
public void update(byte b) -
update
public void update(byte[] bytes) -
update
public void update(byte[] bytes, int off, int length) -
verify
Verify the calculated signature against the passed in PGPSignature.- Parameters:
pgpSig
-- Returns:
- boolean
- Throws:
PGPException
-
getKeyID
public long getKeyID() -
getSignatureType
public int getSignatureType() -
getHashAlgorithm
public int getHashAlgorithm() -
getKeyAlgorithm
public int getKeyAlgorithm() -
getEncoded
- Throws:
IOException
-
encode
- Throws:
IOException
-