jsdsi
Class PublicKeyHash

java.lang.Object
  extended byjsdsi.Obj
      extended byjsdsi.Principal
          extended byjsdsi.PublicKeyHash
All Implemented Interfaces:
java.security.Principal, java.io.Serializable, Subject

public class PublicKeyHash
extends Principal

The cryptographic hash of a public key.

Version:
$Revision: 1.5.2.1 $ $Date: 2005/11/08 03:12:52 $
Author:
Sameer Ajmani, Sean Radford
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class jsdsi.Subject
Subject.Default
 
Field Summary
 
Fields inherited from class jsdsi.Obj
_obj
 
Constructor Summary
PublicKeyHash(Hash h)
          Creates a new PublicKeyHash.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Hash getHash()
           
 java.net.URI[] getURIs()
           
 int hashCode()
           
static PublicKeyHash parsePublicKeyHash(SexpList l)
           
 boolean samePrincipalAs(Principal p)
          Compares this Principal with another.
 SexpList toSexp()
          Creates an SexpList -representation from this SDSI-object.
 
Methods inherited from class jsdsi.Principal
getName
 
Methods inherited from class jsdsi.Obj
parseObj, parseObj, readResolve, toByteArray, toString, toString, toTransport
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.security.Principal
toString
 

Constructor Detail

PublicKeyHash

public PublicKeyHash(Hash h)
Creates a new PublicKeyHash.

Parameters:
h - hash to create the PublicKeyHash.
Method Detail

getHash

public Hash getHash()
Returns:
the hash.

getURIs

public java.net.URI[] getURIs()
Specified by:
getURIs in class Principal
See Also:
Principal.getURIs()

samePrincipalAs

public boolean samePrincipalAs(Principal p)
Description copied from class: Principal
Compares this Principal with another.

Specified by:
samePrincipalAs in class Principal
Parameters:
p - another principal to compare this one with.
Returns:
true if both principal are the same (with respect to their public key), false otherwise.
See Also:
Principal.samePrincipalAs(Principal)

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.security.Principal
Specified by:
equals in class Obj
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Specified by:
hashCode in interface java.security.Principal
Specified by:
hashCode in class Obj
See Also:
Object.hashCode()

toSexp

public SexpList toSexp()
Description copied from class: Obj
Creates an SexpList -representation from this SDSI-object.

Specified by:
toSexp in interface Subject
Specified by:
toSexp in class Obj
Returns:
an SexpList that represents this SDSI-object.

parsePublicKeyHash

public static PublicKeyHash parsePublicKeyHash(SexpList l)
                                        throws SexpParseException
Throws:
SexpParseException


Copyright © 2002-2006 JSDSI. All Rights Reserved.