ostore.security
Class SignedQSTreePath

java.lang.Object
  |
  +--ostore.security.SignedQS
        |
        +--ostore.security.SignedQSTreePath
All Implemented Interfaces:
QuickSerializable

public class SignedQSTreePath
extends SignedQS

SignedQSTree

Version:
$Id: SignedQSTreePath.java,v 1.10 2002/07/20 19:38:03 srhea Exp $
Author:
Sean C. Rhea

Nested Class Summary
 
Nested classes inherited from class ostore.security.SignedQS
SignedQS.SignatureBuffer
 
Field Summary
 
Fields inherited from class ostore.security.SignedQS
_qs_signature, _qs_signature_type, _signature, _user_data
 
Constructor Summary
SignedQSTreePath(InputBuffer buffer)
           
SignedQSTreePath(SignedQSTree source, int elt_num)
           
 
Method Summary
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
           
 QuickSerializable user_data()
          The data which this object signs.
 boolean verify(PublicKey pubkey, Signature engine)
          Verify that the signature over user_data() is valid.
 
Methods inherited from class ostore.security.SignedQS
init, init, main, qs_signature, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SignedQSTreePath

public SignedQSTreePath(SignedQSTree source,
                        int elt_num)

SignedQSTreePath

public SignedQSTreePath(InputBuffer buffer)
                 throws QSException
Method Detail

user_data

public QuickSerializable user_data()
Description copied from class: SignedQS
The data which this object signs. Please see the note about this in (QuickSerializable, KeyPair, SecureRandom, Signature). Also, note that SignedQS.verify(java.security.PublicKey, java.security.Signature) should be called to verify that the signature is correct.

Overrides:
user_data in class SignedQS
Returns:
the data which is signed

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Overrides:
serialize in class SignedQS
Parameters:
buffer - the output buffer to add the object to

verify

public boolean verify(PublicKey pubkey,
                      Signature engine)
               throws InvalidKeyException,
                      SignatureException,
                      TypeTable.NoSuchTypeCode
Description copied from class: SignedQS
Verify that the signature over SignedQS.user_data() is valid.

Overrides:
verify in class SignedQS
Parameters:
pubkey - The public key of the alleged signer of this message.
engine - a signature generating engine such that
provider  ().equals (engine.getProvider ().getName ())
and
algorithm ().equals (engine.getAlgorithm ())
These can be obtained through the function Signature.getInstance(String) or Signature.getInstance(String, String).
Returns:
true if the signature is valid, false otherwise
InvalidKeyException
SignatureException
TypeTable.NoSuchTypeCode

toString

public String toString()
Overrides:
toString in class SignedQS