| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
SecureHash is the interface used to represent classes which are secure hashes An example is the SHA1 hash
| Method Summary | |
|---|---|
|  byte[] | bytes()Returns the bytes contained in this hash | 
|  Object | clone()This is the clone routine for Fragment. | 
|  boolean | equals(Object o)Compares this SecureHash with another hash, and returns true iff they are the same type of hash and have the same byte representation | 
|  String | fullString()Converts all bytes of this SecureHash to a human-readable String | 
|  void | hash(byte[] bytes)Hashes over the input bytes | 
|  void | hash(byte[] bytes,
     int offset,
     int len)Hashes over the input bytes, starting at offset, going for len | 
|  void | hash(QuickSerializable o)Hashes over a QuickSerializable object | 
|  void | hash(String str)Hashes over the bytes of the input String | 
|  int | hashCode()Calculates a Java hash code for this SecureHash object (typically by taking its lower order bytes) | 
|  boolean | isNull()Determines if this SecureHash is a NULL hash or not. | 
|  SecureHash | nullHash()Returns the implementation's NULL hash (typically all zeroes). | 
|  int | size()Return the number of bytes used in the representation of this hash (for example, SHA1 uses 20 bytes) | 
|  String | toString()Converts a few bytes of this SecureHash to a human-readable String | 
|  boolean | verify(QuickSerializable o)Verifies a QuickSerializable object | 
| Methods inherited from interface java.lang.Comparable | 
|---|
| compareTo | 
| Methods inherited from interface ostore.util.QuickSerializable | 
|---|
| serialize | 
| Method Detail | 
public int size()
public boolean isNull()
public SecureHash nullHash()
public byte[] bytes()
public boolean equals(Object o)
equals in class Objecto - the object with which to compare this SecureHash
public int hashCode()
hashCode in class Object
public void hash(byte[] bytes,
                 int offset,
                 int len)
bytes - byte array over which to hashoffset - offset in bytes[] at which to begin hashinglen - number of bytes over which to hashpublic void hash(byte[] bytes)
bytes - byte array over which to hashpublic void hash(QuickSerializable o)
o - the object over which to hashpublic void hash(String str)
str - the String over which to hashpublic boolean verify(QuickSerializable o)
o - the object over which to hash
public String toString()
toString in class Objectpublic String fullString()
public Object clone()
             throws CloneNotSupportedException
CloneNotSupportedException| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||