org.apache.commons.openpgp

Interface OpenPgpStreamingSignatureVerifier

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 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 Details

ROLE

public static final String ROLE

Method Details

finish

public SignatureStatus finish()
            throws OpenPgpException,
                   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

update

public 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

public 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