org.keyczar.interfaces
Interface VerifyingStream

All Superinterfaces:
Stream

public interface VerifyingStream
extends Stream

Verifying Streams are able to verify data that has been signed by SigningStream objects.

Author:
steveweis@gmail.com (Steve Weis)

Method Summary
 int digestSize()
           
 void initVerify()
          Initialize this stream for verification.
 void updateVerify(java.nio.ByteBuffer input)
          Update the data which has been signed.
 boolean verify(java.nio.ByteBuffer signature)
          Verify that the given signautre is a valid signautre on the updated data.
 

Method Detail

digestSize

int digestSize()
Returns:
The size of digests that this stream will verify.

initVerify

void initVerify()
                throws KeyczarException
Initialize this stream for verification. This must be called before updateVerify().

Throws:
KeyczarException - If a Java JCE error occurs.

updateVerify

void updateVerify(java.nio.ByteBuffer input)
                  throws KeyczarException
Update the data which has been signed.

Parameters:
input - Data which has been signed.
Throws:
KeyczarException - If a Java JCE error occurs.

verify

boolean verify(java.nio.ByteBuffer signature)
               throws KeyczarException
Verify that the given signautre is a valid signautre on the updated data.

Parameters:
signature - The signature to verify
Returns:
Whether the given signature is valid.
Throws:
KeyczarException - If a Java JCE error occurs.