org.apache.commons.openpgp
Class BouncyCastleOpenPgpStreamingSignatureVerifier
java.lang.Object
org.apache.commons.openpgp.BouncyCastleOpenPgpStreamingSignatureVerifier
- All Implemented Interfaces:
- OpenPgpStreamingSignatureVerifier
public class BouncyCastleOpenPgpStreamingSignatureVerifier
- extends 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BouncyCastleOpenPgpStreamingSignatureVerifier
public BouncyCastleOpenPgpStreamingSignatureVerifier(InputStream signature,
KeyRing keyRing)
throws OpenPgpException,
IOException
- Throws:
OpenPgpException
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,
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
IOException
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.