org.apache.commons.openpgp
Class BouncyCastleOpenPgpStreamingSignatureVerifier
java.lang.Object
org.apache.commons.openpgp.BouncyCastleOpenPgpStreamingSignatureVerifier
- All Implemented Interfaces:
- OpenPgpStreamingSignatureVerifier
public class BouncyCastleOpenPgpStreamingSignatureVerifier
- extends java.lang.Object
- implements OpenPgpStreamingSignatureVerifier
Bouncy Castle implementation of the OpenPGP signer.
- Author:
- Brett Porter
Method Summary |
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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BouncyCastleOpenPgpStreamingSignatureVerifier
public BouncyCastleOpenPgpStreamingSignatureVerifier(java.io.InputStream signature,
KeyRing keyRing,
boolean asciiArmor)
throws OpenPgpException,
java.io.IOException
- Throws:
OpenPgpException
java.io.IOException
update
public void update(byte[] buf)
throws OpenPgpException
- Description copied from interface:
OpenPgpStreamingSignatureVerifier
- Update the signature with the next block from the data buffer.
- Specified by:
update
in interface OpenPgpStreamingSignatureVerifier
- Parameters:
buf
- the buffer
- Throws:
OpenPgpException
- if the buffer is not valid for updating the signature
update
public void update(byte[] buf,
int offset,
int length)
throws OpenPgpException
- Description copied from interface:
OpenPgpStreamingSignatureVerifier
- Update the signature with the next block from the data buffer.
- Specified by:
update
in interface OpenPgpStreamingSignatureVerifier
- Parameters:
buf
- the bufferoffset
- offset within the buffer to start fromlength
- number of bytes in the buffer to read from
- Throws:
OpenPgpException
- if the buffer is not valid for updating the signature
finish
public SignatureStatus finish()
throws OpenPgpException,
java.io.IOException
- Description copied from interface:
OpenPgpStreamingSignatureVerifier
- Finish and verify the signature that has been obtained.
- Specified by:
finish
in interface OpenPgpStreamingSignatureVerifier
- Returns:
- the status of the signature
- Throws:
OpenPgpException
- if the signature is not in a consistent or complete state
java.io.IOException
verify
public SignatureStatus verify()