Inheritance diagram for Acme.Crypto.Hash:
Definition at line 45 of file Hash.java.
Public Member Functions | |
Hash (int hashSize) | |
Constructor. All sub-class constructors should call reset(). | |
int | hashSize () |
Return how big a hash is. | |
abstract void | reset () |
Initialize (reset) the hash. | |
abstract void | add (byte b) |
Add a byte to the hash. | |
void | add (byte[] data, int off, int len) |
Add some bytes to the hash. Default version just calls add(byte). | |
byte[] | get () |
Get the current hash. | |
void | add (String str) |
Add a String to the hash. | |
void | addASCII (String str) |
Add a String to the hash, ignoring the high bytes of each char. | |
void | add (byte[] data) |
Add a byte array to the hash. | |
void | add (boolean b) |
Add a boolean to the hash. | |
void | add (char c) |
Add a char to the hash. | |
void | add (short s) |
Add a short to the hash. | |
void | add (int i) |
Add an int to the hash. | |
void | add (long l) |
Add a long to the hash. | |
void | add (float f) |
Add a float to the hash. | |
void | add (double d) |
Add a double to the hash. | |
void | add (Object o) |
Add any Object to the hash. | |
boolean | equals (Hash otherHash) |
Check if two hashes are equal. | |
int | hashCode () |
Compute a Java int hash code, for use with java.util.Hashtable. | |
String | toString () |
Convert a Hash to a String representation. | |
Static Public Member Functions | |
static byte[] | hashStr (String str, Hash hash) |
Static utility routine for hashing a String in one step. | |
Protected Member Functions | |
void | prepare () |
Prepare the hash bytes for use. This is called by get() just. | |
Protected Attributes | |
int | hashSize |
How big a hash is. | |
byte[] | hashBytes |
The hash bytes. |