org.apache.commons.openpgp

Interface OpenPgpStreamingSigner

Known Implementing Classes:
BouncyCastleOpenPgpStreamingSigner

public interface OpenPgpStreamingSigner

An interface for updating an OpenPGP signature on the fly with streaming data.
Author:
Brett Porter

Field Summary

static String
ROLE

Method Summary

byte[]
finish()
Finish creating the signature.
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 byte[] finish()
            throws OpenPgpException,
                   IOException
Finish creating the signature.
Returns:
the completed 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