org.keyczar.interfaces
Interface SigningStream

All Superinterfaces:
Stream

public interface SigningStream
extends Stream

Signing streams are able to sign data

Author:
steveweis@gmail.com (Steve Weis)

Method Summary
 int digestSize()
          Return the size of the signature or digest in number of bytes.
 void initSign()
          Initializes this stream for signing.
 void sign(java.nio.ByteBuffer output)
          Sign the updated input and output the signature in the given buffer.
 void updateSign(java.nio.ByteBuffer input)
          Update the signature with the given input.
 

Method Detail

initSign

void initSign()
              throws KeyczarException
Initializes this stream for signing.

Throws:
KeyczarException - If any Java JCE errors occur

updateSign

void updateSign(java.nio.ByteBuffer input)
                throws KeyczarException
Update the signature with the given input.

Parameters:
input - The input to sign.
Throws:
KeyczarException - If any Java JCE errors occur

sign

void sign(java.nio.ByteBuffer output)
          throws KeyczarException
Sign the updated input and output the signature in the given buffer.

Parameters:
output - The output where the signature will be written.
Throws:
KeyczarException - If any Java JCE errors occur or the output buffer is too small.

digestSize

int digestSize()
Return the size of the signature or digest in number of bytes.

Returns:
size of signature in bytes