org.apache.commons.openpgp
public class BouncyCastleOpenPgpStreamingSignatureVerifier extends java.lang.Object implements OpenPgpStreamingSignatureVerifier
ROLE
Constructor and Description |
---|
BouncyCastleOpenPgpStreamingSignatureVerifier(java.io.InputStream signature,
KeyRing keyRing,
boolean asciiArmor) |
Modifier and Type | Method and Description |
---|---|
SignatureStatus |
finish()
Finish and verify the signature that has been obtained.
|
void |
update(byte[] buf)
Update the signature with the next block from the data buffer.
|
void |
update(byte[] buf,
int offset,
int length)
Update the signature with the next block from the data buffer.
|
SignatureStatus |
verify() |
public BouncyCastleOpenPgpStreamingSignatureVerifier(java.io.InputStream signature, KeyRing keyRing, boolean asciiArmor) throws OpenPgpException, java.io.IOException
OpenPgpException
java.io.IOException
public void update(byte[] buf) throws OpenPgpException
OpenPgpStreamingSignatureVerifier
update
in interface OpenPgpStreamingSignatureVerifier
buf
- the bufferOpenPgpException
- if the buffer is not valid for updating the signaturepublic void update(byte[] buf, int offset, int length) throws OpenPgpException
OpenPgpStreamingSignatureVerifier
update
in interface OpenPgpStreamingSignatureVerifier
buf
- the bufferoffset
- offset within the buffer to start fromlength
- number of bytes in the buffer to read fromOpenPgpException
- if the buffer is not valid for updating the signaturepublic SignatureStatus finish() throws OpenPgpException, java.io.IOException
OpenPgpStreamingSignatureVerifier
finish
in interface OpenPgpStreamingSignatureVerifier
OpenPgpException
- if the signature is not in a consistent or complete statejava.io.IOException
public SignatureStatus verify()