jsdsi
Class Proof

java.lang.Object
  |
  +--jsdsi.Obj
        |
        +--jsdsi.Proof

public class Proof
extends Obj

A statement (a Cert) and a sequence of Certificates (Certs + validators) that proves that the statement holds. Proofs are self-validating and can be composed to create new proofs.

Author:
Sameer Ajmani
See Also:
Certificate, Cert

Nested Class Summary
static class Proof.IncompatibleException
           
 
Constructor Summary
Proof(Certificate c)
           
 
Method Summary
 Proof compose(Proof p)
          Composes this proof with another proof.
 boolean equals(java.lang.Object o)
           
 Cert getCert()
           
 Certificate[] getCertificates()
           
 Sequence getSequence()
           
 int hashCode()
           
 SexpList toSexp()
           
 void verify()
           
 
Methods inherited from class jsdsi.Obj
parseObj, parseObj, toByteArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Proof

public Proof(Certificate c)
Method Detail

getCert

public Cert getCert()

getCertificates

public Certificate[] getCertificates()

getSequence

public Sequence getSequence()

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in class Obj

hashCode

public int hashCode()
Specified by:
hashCode in class Obj

toSexp

public SexpList toSexp()
Specified by:
toSexp in class Obj

verify

public void verify()
            throws java.security.cert.CertificateException,
                   java.security.NoSuchAlgorithmException,
                   java.security.InvalidKeyException,
                   java.security.NoSuchProviderException,
                   java.security.SignatureException
java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.NoSuchProviderException
java.security.SignatureException

compose

public Proof compose(Proof p)
              throws Proof.IncompatibleException
Composes this proof with another proof.

Parameters:
p - the proof to compose this with
Returns:
a new proof that is the composition of this with p.
Throws:
Proof.IncompatibleException - if this cannot be composed with p.
Proof.IncompatibleException