jsdsi
Class Hash

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

public class Hash
extends Obj

A cryptographic hash value. Specifies the hash algorithm, the hash value, and an optional set of URIs that specify where the hashed object is located.

Author:
Sameer Ajmani

Constructor Summary
Hash(java.lang.String a, byte[] d)
           
Hash(java.lang.String a, byte[] d, java.net.URL[] u)
           
Hash(java.lang.String a, Obj o)
           
Hash(java.lang.String a, Obj o, java.net.URL[] u)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getAlgorithm()
           
 byte[] getData()
           
 java.net.URL[] getURLs()
           
 int hashCode()
           
static Hash parseHash(SexpList l)
           
 SexpList toSexp()
           
 
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

Hash

public Hash(java.lang.String a,
            byte[] d,
            java.net.URL[] u)

Hash

public Hash(java.lang.String a,
            Obj o,
            java.net.URL[] u)

Hash

public Hash(java.lang.String a,
            byte[] d)

Hash

public Hash(java.lang.String a,
            Obj o)
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()

getData

public byte[] getData()

getURLs

public java.net.URL[] getURLs()

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

parseHash

public static Hash parseHash(SexpList l)
                      throws SexpParseException
SexpParseException