sdsi
Class SDSISignature

java.lang.Object
  |
  +--sdsi.SDSIObject
        |
        +--sdsi.SDSISignature
All Implemented Interfaces:
SequenceItem, java.io.Serializable

public class SDSISignature
extends SDSIObject
implements SequenceItem

Author:
Alexander Morcos, Sameer Ajmani
See Also:
Serialized Form

Field Summary
 java.lang.String algo
           
 Hash hashOfObject
           
 SDSIPrincipal principal
           
 byte[] sig
           
 
Fields inherited from class sdsi.SDSIObject
_hash, _modified, srep
 
Constructor Summary
SDSISignature(SDSIObject signedObject, SDSIPrivateKey privKey, SDSIPublicKey pubKey)
           
SDSISignature(SexpList l)
           
 
Method Summary
 java.lang.String getAbbreviation()
          Returns a single or double letter abbreviation this SDSIObject.
 Hash getHashOfObject()
           
 SDSIPrincipal getPrincipal()
           
 byte[] getSignatureValue()
           
 java.lang.String getType()
          Returns a short string that represents the type of this SDSIObject.
 boolean matches(SDSIObject object)
           
 boolean sameAs(java.lang.Object object)
           
 java.lang.String toShortString()
          Returns a short descriptive string representing this SDSIObject.
 boolean verify(SDSIPublicKey verifyKey, SDSIObject objToVerify)
           
 
Methods inherited from class sdsi.SDSIObject
equals, getHash, getHash, getSrep, hashCode, principalParse, readFrom, readFrom, sign, toReadableString, toString, writeCanonical, writeReadable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface sdsi.SequenceItem
getSrep
 

Field Detail

principal

public SDSIPrincipal principal

hashOfObject

public Hash hashOfObject

algo

public java.lang.String algo

sig

public byte[] sig
Constructor Detail

SDSISignature

public SDSISignature(SDSIObject signedObject,
                     SDSIPrivateKey privKey,
                     SDSIPublicKey pubKey)
              throws java.security.SignatureException

SDSISignature

public SDSISignature(SexpList l)
              throws SexpParseException
Method Detail

sameAs

public boolean sameAs(java.lang.Object object)
Overrides:
sameAs in class SDSIObject

toShortString

public java.lang.String toShortString()
Description copied from class: SDSIObject
Returns a short descriptive string representing this SDSIObject.

Specified by:
toShortString in class SDSIObject
Returns:
a short string description of this SDSIObject.

getType

public java.lang.String getType()
Description copied from class: SDSIObject
Returns a short string that represents the type of this SDSIObject.

Overrides:
getType in class SDSIObject
Returns:
a string represent the type of SDSIObject we're dealing with.

getAbbreviation

public java.lang.String getAbbreviation()
Description copied from class: SDSIObject
Returns a single or double letter abbreviation this SDSIObject.

Specified by:
getAbbreviation in class SDSIObject
Returns:
an abbreviated description of this SDSIObject.

getPrincipal

public SDSIPrincipal getPrincipal()

getHashOfObject

public Hash getHashOfObject()

matches

public boolean matches(SDSIObject object)

getSignatureValue

public byte[] getSignatureValue()

verify

public boolean verify(SDSIPublicKey verifyKey,
                      SDSIObject objToVerify)
               throws SexpParseException,
                      java.security.NoSuchAlgorithmException,
                      java.security.SignatureException,
                      java.security.InvalidKeyException
SexpParseException
java.security.NoSuchAlgorithmException
java.security.SignatureException
java.security.InvalidKeyException