org.apache.commons.openpgp
Interface OpenPgpStreamingSignatureVerifier

All Known Implementing Classes:
BouncyCastleOpenPgpStreamingSignatureVerifier

public interface OpenPgpStreamingSignatureVerifier

An interface for updating an OpenPGP signature on the fly with streaming data.

Author:
Brett Porter

Field Summary
static java.lang.String ROLE
           
 
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.
 

Field Detail

ROLE

static final java.lang.String ROLE
Method Detail

update

void update(byte[] buf)
            throws OpenPgpException
Update the signature with the next block from the data buffer.

Parameters:
buf - the buffer
Throws:
OpenPgpException - if the buffer is not valid for updating the signature

update

void update(byte[] buf,
            int offset,
            int length)
            throws OpenPgpException
Update the signature with the next block from the data buffer.

Parameters:
buf - the buffer
offset - offset within the buffer to start from
length - number of bytes in the buffer to read from
Throws:
OpenPgpException - if the buffer is not valid for updating the signature

finish

SignatureStatus finish()
                       throws OpenPgpException,
                              java.io.IOException
Finish and verify the signature that has been obtained.

Returns:
the status of the signature
Throws:
OpenPgpException - if the signature is not in a consistent or complete state
java.io.IOException